Developers · Docs
The API, plainly.
OpenAI-shaped, buffered (non-streaming). Machine-readable spec: /api/public/v1/openapi.json
Authentication
Sign in with a Solana wallet, then issue a key at API keys. Send it as Authorization: Bearer srp_…. Keys are shown once; only a prefix and SHA-256 digest are stored.
Endpoints
| Route | Models | Returns | Notes |
|---|---|---|---|
| GET /models | — | JSON | Callable models per capability. |
| POST /chat/completions | openai/gpt-6-astra, openai/gpt-6-luna, openai/gpt-6-sol, google/gemini-3.8-flash, google/gemini-3.1-flash-lite, google/gemini-3.1-pro-preview | JSON | Buffered, non-streaming. |
| POST /responses | openai/gpt-6-astra, openai/gpt-6-luna, openai/gpt-6-sol | JSON | Text input, text output; optional JSON schema. |
| POST /embeddings | openai/text-embedding-3-small | JSON float vectors | Native embedding model, not a chat model. |
| POST /rerank | rerank-v3.5 | JSON scores | No rerank model in the gateway. Needs COHERE_API_KEY; returns 503 not_configured until set. |
| POST /decisions | openai/gpt-6-astra, openai/gpt-6-luna, openai/gpt-6-sol | JSON (strict schema) | Pick one option with scored reasoning. |
| POST /images/generations | openai/gpt-image-2.5-sunburst, google/gemini-3.1-flash-lite-image | JSON b64_json | One image per request. |
| POST /images/edits | openai/gpt-image-2.5-sunburst | JSON b64_json | multipart: image (PNG/JPEG/WebP ≤ 4 MB) + prompt. |
| POST /audio/speech | google/gemini-3.1-flash-tts-preview | audio bytes | Text ≤ 1,000 chars. |
| POST /audio/music | google/lyria-3-clip-preview | audio bytes | Short clip from a prompt. |
| POST /audio/transcriptions | openai/gpt-transcribe | JSON text | multipart: file (audio ≤ 8 MB). |
| POST /videos | google/gemini-omni-1.1-flash | async job | Creates a job owned by your key's wallet. |
| GET /videos | google/gemini-omni-1.1-flash | JSON | Lists your wallet's jobs. |
| GET /videos/{id} | google/gemini-omni-1.1-flash | JSON | Polls status (bounded per key). |
| GET /videos/{id}/content | google/gemini-omni-1.1-flash | video/mp4 | Downloads a completed job. |
All except GET /models need a key. Live availability per model: GET /models. Streaming is not offered.
Examples
GET /models
curl https://<your-seruput-host>/api/public/v1/modelsPOST /chat/completions
curl https://<your-seruput-host>/api/public/v1/chat/completions \
-H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"openai/gpt-6-astra","messages":[{"role":"user","content":"Hello"}],"max_tokens":200}'POST /responses
curl https://<your-seruput-host>/api/public/v1/responses -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"openai/gpt-6-sol","input":"Name one Solana DEX.","max_output_tokens":60}'POST /decisions
curl https://<your-seruput-host>/api/public/v1/decisions -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"question":"Which launch order?","options":["Docs first","API first"],"criteria":["risk","speed"]}'POST /embeddings
curl https://<your-seruput-host>/api/public/v1/embeddings -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"input":["velvet dunes","amber rim light"],"dimensions":256}'POST /images/generations → PNG
curl -s https://<your-seruput-host>/api/public/v1/images/generations -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"prompt":"a sprout in a straw, macro"}' | jq -r '.data[0].b64_json' | base64 -d > out.pngPOST /images/edits (multipart)
curl -s https://<your-seruput-host>/api/public/v1/images/edits -H "Authorization: Bearer $DOPPLE_API_KEY" \
-F image=@in.png -F prompt="make the sky aubergine" | jq -r '.data[0].b64_json' | base64 -d > edit.pngPOST /audio/speech → audio file
curl -s https://<your-seruput-host>/api/public/v1/audio/speech -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"input":"Take a sip.","voice":"Kore"}' -o speech.wavPOST /audio/music → audio file
curl -s https://<your-seruput-host>/api/public/v1/audio/music -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"prompt":"slow warm synth pad, 80 bpm"}' -o clip.audioPOST /audio/transcriptions
curl -s https://<your-seruput-host>/api/public/v1/audio/transcriptions -H "Authorization: Bearer $DOPPLE_API_KEY" -F file=@note.mp3Video: create, poll, download
ID=$(curl -s https://<your-seruput-host>/api/public/v1/videos -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"prompt":"violet dunes at dusk, slow dolly","seconds":4}' | jq -r .id)
curl -s https://<your-seruput-host>/api/public/v1/videos/$ID -H "Authorization: Bearer $DOPPLE_API_KEY" # repeat until completed
curl -s https://<your-seruput-host>/api/public/v1/videos/$ID/content -H "Authorization: Bearer $DOPPLE_API_KEY" -o clip.mp4POST /rerank
curl https://<your-seruput-host>/api/public/v1/rerank -H "Authorization: Bearer $DOPPLE_API_KEY" -H "Content-Type: application/json" \
-d '{"query":"fees","documents":["pool fees","weather"]}' # 503 not_configured until COHERE_API_KEY is setCLI
A single-file client with no packages (Node 18+). It talks to this deployment and uses your key.
Download and run
curl -o dopple.mjs https://<your-seruput-host>/api/public/cli.mjs
export DOPPLE_API_KEY=srp_…
node dopple.mjs models
node dopple.mjs chat -m google/gemini-3.1-flash-lite "ping"
node dopple.mjs respond "one line about velvet"
node dopple.mjs image -o sprout.png "a sprout in a straw"Limits & fair use
- Message content ≤ 6000 characters each, ≤ 24 messages, body ≤ 64 KB.
- max_tokens ≤ 1200.
- Anonymous web use: 40 calls/hour per network. Wallet: 300/day. Key: 500/day. Images: 6/day anonymous, 20/day per wallet.
- Per key per day: images 20, audio 20, video 2, embeddings 500, rerank 300; video polling 120/hour. Media calls also count extra units against the key's daily total.
- Shared pool ceilings per day across everyone: chat 6000 units, images 120, audio 120, video 8 units. When hit, calls return 503 pool_budget_exhausted.
- Quotas are enforced atomically in the database, shared across every surface.
Errors
| 400 | invalid_request_error / invalid_json / context_too_large | Fix the body; the message names the field. |
| 401 | invalid_api_key | Key missing, malformed or revoked. |
| 413 | request_too_large | Body over 64 KB. |
| 429 | rate_limit_exceeded | Over 500/day per key or 300/day per wallet. Resets 00:00 UTC. |
| 404 / 409 | not_found / not_ready | Video job is not yours, or not completed yet. |
| 415 | unsupported_media_type | Edits and transcriptions need multipart/form-data. |
| 503 | pool_budget_exhausted | The shared daily budget for that capability is used up. |
| 503 | not_configured | Capability needs an operator secret (rerank: COHERE_API_KEY). No provider call is made. |
| 502 | upstream_error | Provider rejected the call. Don't retry unchanged. |
| 503 | upstream_error | Provider busy or rate-limited. Retry with exponential backoff. |
Shape: {"error":{"message":"…","type":"…","code":"…"}}
Receipts
Each call stores surface, model, status, latency and the provider's token counts. Your own appear in Usage; aggregates are public on the ledger. Prompts and outputs are never stored.
