{"openapi":"3.1.0","info":{"title":"Dopple Inference API","version":"1.1.0","description":"OpenAI-shaped endpoints over a shared pool. Buffered (non-streaming). Every call writes a private usage receipt without prompt or output; only daily aggregates are public."},"servers":[{"url":"https://use-dopple.app/api/public/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Dopple key srp_… issued at /account/api-keys"}},"schemas":{"Error":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["message","type"],"additionalProperties":false,"properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}},"paths":{"/models":{"get":{"summary":"List callable models per endpoint, with live availability","responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"checked":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"owned_by":{"type":"string"},"endpoints":{"type":"array","items":{"type":"string"}},"available":{"type":["boolean","null"]},"status":{"type":"string"},"requires_secret":{"type":"string"}}}}}}}}}}}},"/chat/completions":{"post":{"summary":"Chat completion","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"additionalProperties":false,"properties":{"model":{"enum":["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"]},"messages":{"type":"array","minItems":1,"maxItems":24,"items":{"type":"object","required":["role","content"],"additionalProperties":false,"properties":{"role":{"enum":["system","user","assistant"]},"content":{"type":"string","maxLength":6000}}}},"max_tokens":{"type":"integer","minimum":1,"maximum":1200},"stream":{"const":false}}}}}},"responses":{"200":{"description":"Completion","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"chat.completion"},"model":{"type":"string"},"choices":{"type":"array"},"usage":{"type":["object","null"]}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses":{"post":{"summary":"Responses API (text in, text out)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"additionalProperties":false,"properties":{"model":{"enum":["openai/gpt-6-astra","openai/gpt-6-luna","openai/gpt-6-sol"]},"input":{"oneOf":[{"type":"string","maxLength":6000},{"type":"array","maxItems":24,"items":{"type":"object","required":["role","content"],"additionalProperties":false,"properties":{"role":{"enum":["user","assistant","system","developer"]},"content":{"type":"string"}}}}]},"instructions":{"type":"string","maxLength":2000},"max_output_tokens":{"type":"integer","minimum":16,"maximum":1200},"stream":{"const":false}}}}}},"responses":{"200":{"description":"Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"response"},"status":{"type":"string"},"output":{"type":"array"},"output_text":{"type":"string"},"usage":{"type":["object","null"]}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/decisions":{"post":{"summary":"Choose one option with scored reasoning (strict JSON schema)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["question","options"],"additionalProperties":false,"properties":{"model":{"enum":["openai/gpt-6-astra","openai/gpt-6-luna","openai/gpt-6-sol"],"default":"openai/gpt-6-astra"},"question":{"type":"string","minLength":5,"maxLength":2000},"options":{"type":"array","minItems":2,"maxItems":8,"items":{"type":"string","maxLength":300}},"criteria":{"type":"array","maxItems":8,"items":{"type":"string"}},"context":{"type":"string","maxLength":4000}}}}}},"responses":{"200":{"description":"Decision","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"decision"},"choice":{"type":"string"},"choice_index":{"type":"integer"},"confidence":{"type":"number"},"rationale":{"type":"string"},"scores":{"type":"array"},"usage":{"type":["object","null"]}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/embeddings":{"post":{"summary":"Native text embeddings","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input"],"additionalProperties":false,"properties":{"model":{"enum":["openai/text-embedding-3-small"],"default":"openai/text-embedding-3-small"},"input":{"oneOf":[{"type":"string","maxLength":8000},{"type":"array","maxItems":32,"items":{"type":"string","maxLength":8000}}]},"dimensions":{"type":"integer","minimum":64,"maximum":1536},"encoding_format":{"const":"float"}}}}}},"responses":{"200":{"description":"Vectors","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"embedding":{"type":"array","items":{"type":"number"}}}}},"usage":{"type":["object","null"]}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rerank":{"post":{"summary":"Rerank documents (adapter to Cohere; 503 not_configured until COHERE_API_KEY is set)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query","documents"],"additionalProperties":false,"properties":{"model":{"const":"rerank-v3.5"},"query":{"type":"string","maxLength":2000},"documents":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","maxLength":4000}},"top_n":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"Ranked indices","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"relevance_score":{"type":"number"}}}}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images/generations":{"post":{"summary":"Generate one image","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"additionalProperties":false,"properties":{"model":{"enum":["openai/gpt-image-2.5-sunburst","google/gemini-3.1-flash-lite-image"],"default":"openai/gpt-image-2.5-sunburst"},"prompt":{"type":"string","minLength":3,"maxLength":1500},"n":{"const":1},"response_format":{"const":"b64_json"}}}}}},"responses":{"200":{"description":"Image","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string"}}}}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images/edits":{"post":{"summary":"Edit an image from a prompt","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image","prompt"],"additionalProperties":false,"properties":{"image":{"type":"string","format":"binary","description":"PNG/JPEG/WebP ≤ 4 MB"},"prompt":{"type":"string","maxLength":1500},"model":{"enum":["openai/gpt-image-2.5-sunburst"]}}}}}},"responses":{"200":{"description":"Image","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string"}}}}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Not multipart","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audio/speech":{"post":{"summary":"Text to speech; returns audio bytes","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input"],"additionalProperties":false,"properties":{"model":{"enum":["google/gemini-3.1-flash-tts-preview"]},"input":{"type":"string","maxLength":1000},"voice":{"enum":["Kore","Puck","Charon","Aoede","Fenrir","Leda"],"default":"Kore"}}}}}},"responses":{"200":{"description":"Audio (content-type as returned; raw PCM is wrapped as audio/wav)","content":{"audio/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audio/music":{"post":{"summary":"Short music clip from a prompt; returns audio bytes","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"additionalProperties":false,"properties":{"model":{"enum":["google/lyria-3-clip-preview"]},"prompt":{"type":"string","minLength":3,"maxLength":800}}}}}},"responses":{"200":{"description":"Audio","content":{"audio/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audio/transcriptions":{"post":{"summary":"Transcribe audio","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"additionalProperties":false,"properties":{"file":{"type":"string","format":"binary","description":"mp3/m4a/wav/webm/ogg/flac ≤ 8 MB"},"model":{"enum":["openai/gpt-transcribe"]},"language":{"type":"string","pattern":"^[a-z]{2}$"}}}}}},"responses":{"200":{"description":"Transcript","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"usage":{"type":["object","null"]}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Not multipart","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos":{"post":{"summary":"Start an async video job owned by the key's wallet (≤ 2/key/day)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"additionalProperties":false,"properties":{"model":{"enum":["google/gemini-omni-1.1-flash"]},"prompt":{"type":"string","minLength":5,"maxLength":1200},"seconds":{"enum":[4,6,8],"default":4},"resolution":{"enum":["720p","1080p"],"default":"720p"}}}}}},"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"}}}}}},"400":{"description":"Invalid request (message names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Provider rejected the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Provider busy, pool budget exhausted, or capability not_configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List this wallet's video jobs","security":[{"bearer":[]}],"responses":{"200":{"description":"Jobs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array"}}}}}},"401":{"description":"Missing or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos/{id}":{"get":{"summary":"Poll a job (≤ 120 polls/key/hour)","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["queued","in_progress","completed","failed"]},"error":{"type":["string","null"]}}}}}},"404":{"description":"Not your job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Key, wallet or capability quota exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos/{id}/content":{"get":{"summary":"Download a completed video","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Video","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not your job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not completed yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}