Authentication
All API requests must include an x-token header with your API token.
x-token: YOUR_TOKENExample
Section titled “Example”curl 'https://api.echovalue.dev/kv/default/mykey' \ -H 'x-token: mytoken'fetch('https://api.echovalue.dev/kv/default/mykey', { headers: { 'x-token': 'mytoken' }});import requests
requests.get('https://api.echovalue.dev/kv/default/mykey', headers={'x-token': 'mytoken'})<?php$ch = curl_init('https://api.echovalue.dev/kv/default/mykey');curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-token: mytoken']);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$response = curl_exec($ch);curl_close($ch);?>package main
import "net/http"
func main() { req, _ := http.NewRequest("GET", "https://api.echovalue.dev/kv/default/mykey", nil) req.Header.Set("x-token", "mytoken")
client := &http.Client{} client.Do(req)}Response Headers
Section titled “Response Headers”Every API response includes these headers:
| Header | Description |
|---|---|
x-cost | Credits deducted from your wallet for this request |
x-balance | Credits remaining in your wallet after this request |
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
401 Unauthorized | The x-token header is missing or the token is invalid |
402 Payment Required | Your wallet has no credits remaining |
See the Errors page for the full list of error codes.