{"openapi":"3.1.0","info":{"title":"Speechdash API","version":"1.0.0","description":"Create and manage documents, translate or export them, and synthesize speech with Speechdash voices. Authenticate with an API key created in Settings > API and sent as `Authorization: Bearer sh_live_...`. Rate limits are per account (not per key): 120/min on `/documents`, 60/min on `/audio/*`, plus at most 3 parallel speech requests. Every response carries `X-Request-ID`; `/documents` and `/audio/*` also return `X-RateLimit-*`. `POST /documents` and `POST /audio/speech` accept an optional `Idempotency-Key` header for safe retries. Speech holds an estimated cost before generation, then settles to 1 wallet cent per started 30s (`billed_credits` is wallet cents; 2 cents = 1 display credit). Translate bills the same wallet as MP3 export. File export does not spend credits. Playback speed is a client-side concern and is not a request parameter."},"servers":[{"url":"https://api.speechdash.com/v1"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Account","description":"Authenticated account and wallet."},{"name":"Documents","description":"Library documents, including finished audio and video transcripts. There is no separate transcripts resource. Transcription jobs stay in the app; completed jobs appear here with source=transcription."},{"name":"Audio","description":"Synthesize speech."},{"name":"Voices","description":"Browse the voice catalog."}],"paths":{"/me":{"get":{"tags":["Account"],"summary":"Get current account","description":"Returns the authenticated user, plan, and wallet balance. Use this endpoint to verify an API key (for example Zapier connection tests).","operationId":"getCurrentAccount","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Account and credit balance.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"plan_id":{"type":"string"},"wallet_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"display_credits":{"type":"number"},"api_key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"}},"required":["id","name","prefix"],"additionalProperties":false}},"required":["id","email","plan_id","wallet_cents","display_credits"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}}},"/documents":{"get":{"tags":["Documents"],"summary":"List documents","description":"Lists library documents. Finished transcriptions are included; there is no `/transcripts` collection. Check `source` and `transcript_id`.","operationId":"listDocuments","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"description":"Value of `next_cursor` from a previous page.","schema":{"type":"string"}},{"name":"query","in":"query","required":false,"description":"Case-insensitive title filter.","schema":{"type":"string"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"A page of documents.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}},"post":{"tags":["Documents"],"summary":"Create a document","operationId":"createDocument","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional retry key. Replaying the same key with the same body returns the first successful response for 24 hours. Oversized speech responses cannot be replayed and answer `409` instead of regenerating. Not supported on streaming audio endpoints.","schema":{"type":"string","minLength":1,"maxLength":256}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500000},"title":{"type":"string","minLength":1,"maxLength":512},"language":{"type":"string","minLength":2,"maxLength":8,"description":"ISO 639-1 code, detected from the text when omitted"}},"required":["text"],"additionalProperties":false}}}},"responses":{"201":{"description":"The created document.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"text":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at","text"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"403":{"description":"Daily document cap or upload duration limit reached (Free: 3 documents per day; Unlimited: no daily cap).","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}}},"/documents/{document_id}":{"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Documents"],"summary":"Get a document","description":"Returns the document and its current text. Transcripts include speaker and timestamp headers in `text`, with `source` set to transcription. Reader timestamp hiding is app-only; stored `text` keeps the headers. `visibility` and `share_url` describe the unlisted web share page.","operationId":"getDocument","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"The document with its text.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"text":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at","text"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"404":{"description":"Document not found.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}},"put":{"tags":["Documents"],"summary":"Update a document","description":"Update title, text, language, archive state, or visibility. Public documents expose an unlisted `share_url`.","operationId":"updateDocument","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500000},"title":{"type":"string","minLength":1,"maxLength":512},"language":{"type":"string","minLength":2,"maxLength":8,"description":"ISO 639-1 code, detected from the text when omitted"},"is_archived":{"type":"boolean"},"visibility":{"type":"string","enum":["public","private"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The updated document.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"text":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at","text"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"404":{"description":"Document not found.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}},"delete":{"tags":["Documents"],"summary":"Delete a document","operationId":"deleteDocument","security":[{"ApiKeyAuth":[]}],"responses":{"204":{"description":"Document deleted."},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"404":{"description":"Document not found.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}}},"/documents/{document_id}/translate":{"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"tags":["Documents"],"summary":"Translate a document","description":"Create a new translated version. Bills the same credit wallet as MP3 export: 0.5 display credits (1 wallet cent) per started 30 seconds of estimated speech. Transcript clocks (**0:34**, **SPEAKER_00** · 0:34, (0:34)) are playback references copied unchanged; they are not sent through the translation engine. Answers 402 when the wallet is short, and 503 when translation is not configured or down.","operationId":"translateDocument","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target_language":{"type":"string","minLength":2,"maxLength":8,"description":"ISO 639-1 code, detected from the text when omitted"}},"required":["target_language"],"additionalProperties":false}}}},"responses":{"200":{"description":"The new translated version and its text.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"text":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at","text"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"404":{"description":"Document not found.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"503":{"description":"Translation is unavailable.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/documents/{document_id}/export":{"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["pdf","docx","txt","csv","srt","vtt"]}},{"name":"timestamps","in":"query","required":false,"schema":{"type":"string","enum":["1","true","0","false"]}}],"get":{"tags":["Documents"],"summary":"Export a document file","description":"Download the current version as PDF, DOCX, TXT, CSV, SRT, or VTT. SRT/VTT need a transcription or complete sentence timings. This does not generate billed MP3/WAV audio.","operationId":"exportDocument","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Attachment body.","headers":{"Content-Disposition":{"schema":{"type":"string"}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"404":{"description":"Document not found.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}}},"/audio/speech":{"post":{"tags":["Audio"],"summary":"Create speech","description":"Synthesize up to 5000 characters and return the full audio as base64 with sentence-level speech marks. When `language` is omitted it is detected from the input, the same way as document creation. Supports `Idempotency-Key` for safe retries. A client disconnect mid-generation settles delivered audio and answers `204`.","operationId":"createSpeech","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional retry key. Replaying the same key with the same body returns the first successful response for 24 hours. Oversized speech responses cannot be replayed and answer `409` instead of regenerating. Not supported on streaming audio endpoints.","schema":{"type":"string","minLength":1,"maxLength":256}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":5000},"audio_format":{"type":"string","enum":["wav","mp3"]},"voice_id":{"type":"string","minLength":1,"maxLength":16},"language":{"type":"string","minLength":2,"maxLength":8,"description":"ISO 639-1 code, detected from the text when omitted"}},"required":["input","voice_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Generated audio and speech marks.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"audio_data":{"type":"string","description":"Base64-encoded audio"},"audio_format":{"type":"string","enum":["wav","mp3"]},"billable_characters_count":{"type":"number"},"billed_credits":{"type":"number","description":"Wallet cents charged for this request (2 cents = 1 display credit in the app)"},"duration_ms":{"type":"number"},"language":{"type":"string"},"voice_id":{"type":"string"},"speech_marks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"sentence"},"value":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"start_time":{"type":"number"},"end_time":{"type":"number"}},"required":["type","value","start","end","start_time","end_time"],"additionalProperties":false}}},"required":["audio_data","audio_format","billable_characters_count","billed_credits","duration_ms","language","voice_id","speech_marks"],"additionalProperties":false}}}},"204":{"description":"Client disconnected; delivered audio was settled and no body follows."},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"503":{"description":"Speech synthesis unavailable.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/audio/stream":{"post":{"tags":["Audio"],"summary":"Stream speech","description":"Stream a single WAV body: a streaming header followed by the PCM of each sentence as it is generated. Audio already delivered is billed if the client disconnects mid-stream. A WAV body cannot carry an error payload, so a mid-stream failure simply closes the connection.","operationId":"streamSpeech","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":20000},"voice_id":{"type":"string","minLength":1,"maxLength":16},"language":{"type":"string","minLength":2,"maxLength":8,"description":"ISO 639-1 code, detected from the text when omitted"}},"required":["input","voice_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Streamed WAV audio.","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"503":{"description":"Speech synthesis unavailable.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/audio/stream/with-timestamps":{"post":{"tags":["Audio"],"summary":"Stream speech with timestamps","description":"Server-sent events. Each `speech.chunk` carries one sentence as base64 WAV with its speech mark; `speech.done` closes a successful run and is only sent after usage was recorded. `speech.error` reports a mid-stream generation or billing failure. Audio already delivered is billed if the client disconnects.","operationId":"streamSpeechWithTimestamps","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":20000},"voice_id":{"type":"string","minLength":1,"maxLength":16},"language":{"type":"string","minLength":2,"maxLength":8,"description":"ISO 639-1 code, detected from the text when omitted"}},"required":["input","voice_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Server-sent event stream.","content":{"text/event-stream":{"schema":{"description":"Named SSE events: `speech.chunk` (per-sentence WAV + speech_marks), `speech.done` (billed_credits, duration_ms), `speech.error` (code, message)."}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"503":{"description":"Speech synthesis unavailable.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/voices":{"get":{"tags":["Voices"],"summary":"List voices","operationId":"listVoices","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"gender","in":"query","required":false,"schema":{"type":"string","enum":["male","female"]}}],"responses":{"200":{"description":"The voice catalog.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"display_name":{"type":"string"},"gender":{"type":"string","enum":["male","female"]},"languages":{"type":"array","items":{"type":"string"}},"avatar_image":{"type":"string"}},"required":["id","display_name","gender","languages","avatar_image"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}}},"/voices/{voice_id}":{"get":{"tags":["Voices"],"summary":"Get a voice","operationId":"getVoice","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A single voice.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"display_name":{"type":"string"},"gender":{"type":"string","enum":["male","female"]},"languages":{"type":"array","items":{"type":"string"}},"avatar_image":{"type":"string"}},"required":["id","display_name","gender","languages","avatar_image"],"additionalProperties":false}}}},"400":{"description":"Malformed request body.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"404":{"description":"Voice not found.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"409":{"description":"Idempotency-Key is already in progress.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"413":{"description":"Request body above the accepted size.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"API key from Settings > API, prefixed with `sh_live_`."}},"schemas":{"Document":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at"],"additionalProperties":false},"DocumentWithText":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"text":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at","text"],"additionalProperties":false},"DocumentList":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"language":{"type":"string"},"document_type":{"type":"string"},"status":{"type":"string"},"is_archived":{"type":"boolean"},"total_sentences":{"anyOf":[{"type":"number"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the document entered the library, such as api, transcription, homepage, or file-import."},"transcript_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Transcription job id when source is transcription; otherwise null."},"visibility":{"type":"string","enum":["public","private"]},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unlisted web URL when visibility is public; otherwise null."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","language","document_type","status","is_archived","total_sentences","version_id","source","transcript_id","visibility","share_url","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"additionalProperties":false},"Voice":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"display_name":{"type":"string"},"gender":{"type":"string","enum":["male","female"]},"languages":{"type":"array","items":{"type":"string"}},"avatar_image":{"type":"string"}},"required":["id","display_name","gender","languages","avatar_image"],"additionalProperties":false},"SpeechMark":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","const":"sentence"},"value":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"start_time":{"type":"number"},"end_time":{"type":"number"}},"required":["type","value","start","end","start_time","end_time"],"additionalProperties":false},"CreateSpeechRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":5000},"audio_format":{"type":"string","enum":["wav","mp3"]},"voice_id":{"type":"string","minLength":1,"maxLength":16},"language":{"type":"string","minLength":2,"maxLength":8,"description":"ISO 639-1 code, detected from the text when omitted"}},"required":["input","voice_id"],"additionalProperties":false},"CreateSpeechResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"audio_data":{"type":"string","description":"Base64-encoded audio"},"audio_format":{"type":"string","enum":["wav","mp3"]},"billable_characters_count":{"type":"number"},"billed_credits":{"type":"number","description":"Wallet cents charged for this request (2 cents = 1 display credit in the app)"},"duration_ms":{"type":"number"},"language":{"type":"string"},"voice_id":{"type":"string"},"speech_marks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"sentence"},"value":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"start_time":{"type":"number"},"end_time":{"type":"number"}},"required":["type","value","start","end","start_time","end_time"],"additionalProperties":false}}},"required":["audio_data","audio_format","billable_characters_count","billed_credits","duration_ms","language","voice_id","speech_marks"],"additionalProperties":false},"Account":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"plan_id":{"type":"string"},"wallet_cents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"display_credits":{"type":"number"},"api_key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"}},"required":["id","name","prefix"],"additionalProperties":false}},"required":["id","email","plan_id","wallet_cents","display_credits"],"additionalProperties":false},"Error":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","validation_failed","unauthorized","payment_required","document_limit_reached","not_found","conflict","payload_too_large","rate_limited","internal_error","service_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["error","request_id"],"additionalProperties":false}}}}