Skip to content
dopple

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

RouteModelsReturnsNotes
GET /models—JSONCallable models per capability.
POST /chat/completionsopenai/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-previewJSONBuffered, non-streaming.
POST /responsesopenai/gpt-6-astra, openai/gpt-6-luna, openai/gpt-6-solJSONText input, text output; optional JSON schema.
POST /embeddingsopenai/text-embedding-3-smallJSON float vectorsNative embedding model, not a chat model.
POST /rerankrerank-v3.5JSON scoresNo rerank model in the gateway. Needs COHERE_API_KEY; returns 503 not_configured until set.
POST /decisionsopenai/gpt-6-astra, openai/gpt-6-luna, openai/gpt-6-solJSON (strict schema)Pick one option with scored reasoning.
POST /images/generationsopenai/gpt-image-2.5-sunburst, google/gemini-3.1-flash-lite-imageJSON b64_jsonOne image per request.
POST /images/editsopenai/gpt-image-2.5-sunburstJSON b64_jsonmultipart: image (PNG/JPEG/WebP ≤ 4 MB) + prompt.
POST /audio/speechgoogle/gemini-3.1-flash-tts-previewaudio bytesText ≤ 1,000 chars.
POST /audio/musicgoogle/lyria-3-clip-previewaudio bytesShort clip from a prompt.
POST /audio/transcriptionsopenai/gpt-transcribeJSON textmultipart: file (audio ≤ 8 MB).
POST /videosgoogle/gemini-omni-1.1-flashasync jobCreates a job owned by your key's wallet.
GET /videosgoogle/gemini-omni-1.1-flashJSONLists your wallet's jobs.
GET /videos/{id}google/gemini-omni-1.1-flashJSONPolls status (bounded per key).
GET /videos/{id}/contentgoogle/gemini-omni-1.1-flashvideo/mp4Downloads 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/models
POST /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.png
POST /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.png
POST /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.wav
POST /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.audio
POST /audio/transcriptions
curl -s https://<your-seruput-host>/api/public/v1/audio/transcriptions -H "Authorization: Bearer $DOPPLE_API_KEY" -F file=@note.mp3
Video: 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.mp4
POST /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 set

CLI

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

400invalid_request_error / invalid_json / context_too_largeFix the body; the message names the field.
401invalid_api_keyKey missing, malformed or revoked.
413request_too_largeBody over 64 KB.
429rate_limit_exceededOver 500/day per key or 300/day per wallet. Resets 00:00 UTC.
404 / 409not_found / not_readyVideo job is not yours, or not completed yet.
415unsupported_media_typeEdits and transcriptions need multipart/form-data.
503pool_budget_exhaustedThe shared daily budget for that capability is used up.
503not_configuredCapability needs an operator secret (rerank: COHERE_API_KEY). No provider call is made.
502upstream_errorProvider rejected the call. Don't retry unchanged.
503upstream_errorProvider 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.