{"openapi":"3.1.0","info":{"title":"Dawnstack API","version":"1.0.0","description":"An OpenAI-compatible inference API. Point any OpenAI client at this base URL and change the key. Prices are published per million tokens and GET /v1/models needs no credentials.","license":{"name":"Proprietary"}},"servers":[{"url":"https://api.dawnstackai.com/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key, `sk-dawn-` followed by 48 hex characters."}},"schemas":{"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":{}}},{"enum":["null"],"nullable":true}]},"name":{"type":"string"},"tool_call_id":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["role","content"],"additionalProperties":false},"minItems":1},"max_tokens":{"type":"integer","minimum":1,"maximum":32000},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":32000},"temperature":{"type":"number","minimum":0,"maximum":2},"stream":{"type":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"top_p":{"type":"number","minimum":0,"maximum":1},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":4}]},"seed":{"type":"integer"},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2},"presence_penalty":{"type":"number","minimum":-2,"maximum":2},"tools":{"type":"array","items":{"type":"object","additionalProperties":{}}},"tool_choice":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]},"response_format":{"type":"object","additionalProperties":{}},"reasoning_effort":{"type":"string","enum":["none","low","medium","high"]},"logprobs":{"type":"boolean"},"top_logprobs":{"type":"integer","minimum":0,"maximum":20},"prompt_cache_key":{"type":"string","maxLength":200},"user":{"type":"string","maxLength":256},"store":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}},"service_tier":{"type":"string","maxLength":64},"safety_identifier":{"type":"string","maxLength":256},"n":{"type":"integer","minimum":1,"maximum":128}},"required":["model","messages"],"additionalProperties":false},"ChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["role","content"],"additionalProperties":true},"finish_reason":{"type":"string"}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}},"required":["cached_tokens"],"additionalProperties":false}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":true},"dawnstack":{"type":"object","properties":{"cost_micros":{"type":"integer"},"cost_usd":{"type":"number"},"request_id":{"type":"string"}},"required":["cost_micros","cost_usd"],"additionalProperties":false}},"required":["id","object","created","model","choices","usage","dawnstack"],"additionalProperties":true},"Model":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["model"]},"owned_by":{"type":"string"},"modality":{"type":"string","enum":["text","stt","tts"]},"context_window":{"type":"number","nullable":true},"pricing":{"type":"object","properties":{"unit":{"type":"string"},"usd_per_million_input":{"type":"number"},"usd_per_million_output":{"type":"number"}},"required":["unit","usd_per_million_input","usd_per_million_output"],"additionalProperties":false},"alias_for":{"type":"string"},"rationale":{"type":"string"},"reasoning":{"type":"boolean"},"starter":{"type":"boolean"},"supported_parameters":{"type":"array","items":{"type":"string"}},"vendor":{},"facets":{},"performance":{"nullable":true},"quantization":{"type":"string","nullable":true},"language_cost":{},"speech_accuracy_cer":{},"no_language_token":{"type":"array","items":{"type":"string"}}},"required":["id","object","owned_by","pricing"],"additionalProperties":true},"ModelList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["model"]},"owned_by":{"type":"string"},"modality":{"type":"string","enum":["text","stt","tts"]},"context_window":{"type":"number","nullable":true},"pricing":{"type":"object","properties":{"unit":{"type":"string"},"usd_per_million_input":{"type":"number"},"usd_per_million_output":{"type":"number"}},"required":["unit","usd_per_million_input","usd_per_million_output"],"additionalProperties":false},"alias_for":{"type":"string"},"rationale":{"type":"string"},"reasoning":{"type":"boolean"},"starter":{"type":"boolean"},"supported_parameters":{"type":"array","items":{"type":"string"}},"vendor":{},"facets":{},"performance":{"nullable":true},"quantization":{"type":"string","nullable":true},"language_cost":{},"speech_accuracy_cer":{},"no_language_token":{"type":"array","items":{"type":"string"}}},"required":["id","object","owned_by","pricing"],"additionalProperties":true}},"vendors":{"type":"array","items":{}}},"required":["object","data"],"additionalProperties":false},"SpeechRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1},"input":{"type":"string","minLength":1,"maxLength":4096},"voice":{"type":"string","minLength":1,"maxLength":64},"response_format":{"type":"string","enum":["mp3","opus","flac","wav","pcm"],"default":"mp3"},"speed":{"type":"number","minimum":0.25,"maximum":4}},"required":["model","input"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/models":{"get":{"operationId":"listModels","summary":"List every servable model, with prices","description":"Public: no API key. A price list you have to authenticate to read is not a price list. Licence-blocked models never appear here.","security":[],"responses":{"200":{"description":"The catalogue.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["model"]},"owned_by":{"type":"string"},"modality":{"type":"string","enum":["text","stt","tts"]},"context_window":{"type":"number","nullable":true},"pricing":{"type":"object","properties":{"unit":{"type":"string"},"usd_per_million_input":{"type":"number"},"usd_per_million_output":{"type":"number"}},"required":["unit","usd_per_million_input","usd_per_million_output"],"additionalProperties":false},"alias_for":{"type":"string"},"rationale":{"type":"string"},"reasoning":{"type":"boolean"},"starter":{"type":"boolean"},"supported_parameters":{"type":"array","items":{"type":"string"}},"vendor":{},"facets":{},"performance":{"nullable":true},"quantization":{"type":"string","nullable":true},"language_cost":{},"speech_accuracy_cer":{},"no_language_token":{"type":"array","items":{"type":"string"}}},"required":["id","object","owned_by","pricing"],"additionalProperties":true}},"vendors":{"type":"array","items":{}}},"required":["object","data"],"additionalProperties":false}}}}}}},"/models/{model}":{"get":{"operationId":"retrieveModel","summary":"Retrieve one model","description":"Public. Aliases resolve here and carry `alias_for` plus the rationale.","security":[],"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The model.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["model"]},"owned_by":{"type":"string"},"modality":{"type":"string","enum":["text","stt","tts"]},"context_window":{"type":"number","nullable":true},"pricing":{"type":"object","properties":{"unit":{"type":"string"},"usd_per_million_input":{"type":"number"},"usd_per_million_output":{"type":"number"}},"required":["unit","usd_per_million_input","usd_per_million_output"],"additionalProperties":false},"alias_for":{"type":"string"},"rationale":{"type":"string"},"reasoning":{"type":"boolean"},"starter":{"type":"boolean"},"supported_parameters":{"type":"array","items":{"type":"string"}},"vendor":{},"facets":{},"performance":{"nullable":true},"quantization":{"type":"string","nullable":true},"language_cost":{},"speech_accuracy_cer":{},"no_language_token":{"type":"array","items":{"type":"string"}}},"required":["id","object","owned_by","pricing"],"additionalProperties":true}}}},"403":{"description":"The model's licence forbids commercial use, so nobody can serve it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such model.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create a chat completion","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retry safely. Same key and body replays the original response free; a different body is 422; still in flight is 409. Refused with `stream: true`.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":{}}},{"enum":["null"],"nullable":true}]},"name":{"type":"string"},"tool_call_id":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["role","content"],"additionalProperties":false},"minItems":1},"max_tokens":{"type":"integer","minimum":1,"maximum":32000},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":32000},"temperature":{"type":"number","minimum":0,"maximum":2},"stream":{"type":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"top_p":{"type":"number","minimum":0,"maximum":1},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":4}]},"seed":{"type":"integer"},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2},"presence_penalty":{"type":"number","minimum":-2,"maximum":2},"tools":{"type":"array","items":{"type":"object","additionalProperties":{}}},"tool_choice":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}]},"response_format":{"type":"object","additionalProperties":{}},"reasoning_effort":{"type":"string","enum":["none","low","medium","high"]},"logprobs":{"type":"boolean"},"top_logprobs":{"type":"integer","minimum":0,"maximum":20},"prompt_cache_key":{"type":"string","maxLength":200},"user":{"type":"string","maxLength":256},"store":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}},"service_tier":{"type":"string","maxLength":64},"safety_identifier":{"type":"string","maxLength":256},"n":{"type":"integer","minimum":1,"maximum":128}},"required":["model","messages"],"additionalProperties":false}}}},"responses":{"200":{"description":"The completion, or a `text/event-stream` of `chat.completion.chunk` frames when `stream` is true.","headers":{"x-request-id":{"schema":{"type":"string"},"description":"Quote this to report a problem."},"Idempotent-Replay":{"schema":{"type":"string"},"description":"`true` on a replayed response."},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix seconds."}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["role","content"],"additionalProperties":true},"finish_reason":{"type":"string"}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}},"required":["cached_tokens"],"additionalProperties":false}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":true},"dawnstack":{"type":"object","properties":{"cost_micros":{"type":"integer"},"cost_usd":{"type":"number"},"request_id":{"type":"string"}},"required":["cost_micros","cost_usd"],"additionalProperties":false}},"required":["id","object","created","model","choices","usage","dawnstack"],"additionalProperties":true}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"The model does not support a parameter you sent, or you combined Idempotency-Key with stream.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The key is missing, malformed or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Not enough balance. `details` states what was required and what was available.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The model's licence forbids commercial use.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such model.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"An identical Idempotency-Key is still in flight.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The body failed validation, or an Idempotency-Key was reused with a different body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Our fault. `request_id` is in the body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The upstream model failed. You are not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/audio/transcriptions":{"post":{"operationId":"createTranscription","summary":"Transcribe audio to text","description":"Billed per second of audio submitted, rounded up to the whole second. Files are limited to 20 MB and a Content-Length header is required, because the size is checked before the body is read.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","model"],"properties":{"file":{"type":"string","format":"binary","description":"The audio file. Up to 20 MB."},"model":{"type":"string","description":"A model with modality `stt`. See GET /v1/models."},"language":{"type":"string","description":"ISO-639-1 code. Supplying it improves accuracy and costs nothing; detection is unreliable for under-represented languages."},"prompt":{"type":"string","description":"Context to bias the transcription, e.g. proper nouns."},"response_format":{"type":"string","enum":["json","verbose_json","text"],"default":"json","description":"`srt` and `vtt` are not supported yet and return 400 naming the parameter."}}}}}},"responses":{"200":{"description":"The transcription. `verbose_json` adds the detected language, the billed duration in whole seconds, and segment timings.","headers":{"x-request-id":{"schema":{"type":"string"},"description":"Quote this to report a problem."}},"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"language":{"type":"string","nullable":true},"duration":{"type":"integer","description":"Billed seconds, rounded up."},"segments":{"type":"array","items":{"type":"object"}},"dawnstack":{"type":"object","properties":{"cost_micros":{"type":"integer"},"billed_seconds":{"type":"integer"},"request_id":{"type":"string","nullable":true}}}}}},"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"`response_format` is one we do not produce yet (`srt`, `vtt`).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The key is missing, malformed or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Not enough balance to cover the file's worst-case duration.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The model's licence forbids commercial use.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such model.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The file is too large, Content-Length was missing or invalid, a required form field was absent, or the model is not an stt model.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Our fault. `request_id` is in the body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The upstream model failed, or returned no duration to bill from. You are not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/audio/speech":{"post":{"operationId":"createSpeech","summary":"Synthesise speech from text","description":"Returns raw audio. Billed per character of `input`, so the price is known before the request is made. Identical requests are served from cache at a reduced rate — see the `x-dawnstack-cached` response header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1},"input":{"type":"string","minLength":1,"maxLength":4096},"voice":{"type":"string","minLength":1,"maxLength":64},"response_format":{"type":"string","enum":["mp3","opus","flac","wav","pcm"],"default":"mp3"},"speed":{"type":"number","minimum":0.25,"maximum":4}},"required":["model","input"],"additionalProperties":false}}}},"responses":{"200":{"description":"The audio, in the requested format.","headers":{"x-dawnstack-cost-micros":{"schema":{"type":"integer"},"description":"What this request cost."},"x-dawnstack-cached":{"schema":{"type":"string","enum":["hit","miss"]},"description":"`hit` means it was served from cache and billed at the reduced rate."}},"content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}},"audio/wav":{"schema":{"type":"string","format":"binary"}},"audio/opus":{"schema":{"type":"string","format":"binary"}},"audio/flac":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request could not be served as sent.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The key is missing, malformed or revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"402":{"description":"Not enough balance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The model's licence forbids commercial use.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such model.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The body failed validation, `response_format` is not one we produce, or the model is not a tts model.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited. `Retry-After` says when to come back.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Our fault. `request_id` is in the body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"The upstream model failed. You are not charged.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","rate_limit_error","insufficient_quota","api_error"]},"param":{"type":"string","nullable":true},"code":{"type":"string"},"details":{},"request_id":{"type":"string"}},"required":["message","type","param","code"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}}}