diff --git a/api-reference/openapi.json b/api-reference/openapi.json index 2a01be3..fe80695 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -491,7 +491,7 @@ "/v1/agent/sessions": { "get": { "summary": "List Agent Sessions", - "description": "List your team's sessions, newest first. Filter by agent, status, caller\nnumber, or creation time. Paginate with `cursor` (recommended; follow\n`next_cursor` while `has_more` is true) or with `page` for offset pagination\nwith a `total` count \u2014 the two are mutually exclusive.", + "description": "List your team's sessions, newest first. Filter by agent, status, caller\nnumber, or creation time. Paginate with `cursor` (recommended; follow\n`next_cursor` while `has_more` is true) or with `page` for offset pagination\nwith a `total` count — the two are mutually exclusive.", "security": [ { "BearerAuth": [] @@ -2128,7 +2128,7 @@ "/v1/agent/agents": { "get": { "summary": "List Agents", - "description": "List your team's agents, newest first. Paginate with `cursor` (follow\n`next_cursor` while `has_more` is true) or with `page` for offset\npagination with a `total` count \u2014 the two are mutually exclusive.", + "description": "List your team's agents, newest first. Paginate with `cursor` (follow\n`next_cursor` while `has_more` is true) or with `page` for offset\npagination with a `total` count — the two are mutually exclusive.", "security": [ { "BearerAuth": [] @@ -2420,7 +2420,7 @@ }, "post": { "summary": "Create Agent", - "description": "Create an agent, optionally with its full initial configuration inline \u2014\none call provisions a ready-to-publish agent. The agent starts as a draft:\npublish it before creating sessions with it.", + "description": "Create an agent, optionally with its full initial configuration inline —\none call provisions a ready-to-publish agent. The agent starts as a draft:\npublish it before creating sessions with it.", "security": [ { "BearerAuth": [] @@ -2921,7 +2921,7 @@ }, "patch": { "summary": "Update Agent", - "description": "Update agent-level fields (name, description, status, public access and\nsession-override policy). Omitted fields keep their value. Conversation\nbehavior \u2014 voice, prompt, recording and the rest \u2014 is draft configuration:\nuse `PATCH /v1/agent/agents/{agent_id}/config`.", + "description": "Update agent-level fields (name, description, status, public access and\nsession-override policy). Omitted fields keep their value. Conversation\nbehavior — voice, prompt, recording and the rest — is draft configuration:\nuse `PATCH /v1/agent/agents/{agent_id}/config`.", "security": [ { "BearerAuth": [] @@ -3341,7 +3341,7 @@ "/v1/agent/agents/{agent_id}/widget": { "get": { "summary": "Get Widget Config", - "description": "Unauthenticated display configuration for the embeddable ``\nwidget. Only agents published as public are reachable, and the request\n`Origin` must match the agent's allowed origins \u2014 the same gate as\nanonymous session creation. Attributes set on the embed tag override\nevery field returned here.", + "description": "Unauthenticated display configuration for the embeddable ``\nwidget. Only agents published as public are reachable, and the request\n`Origin` must match the agent's allowed origins — the same gate as\nanonymous session creation. Attributes set on the embed tag override\nevery field returned here.", "parameters": [ { "in": "path", @@ -3381,7 +3381,7 @@ "content": { "application/json": { "schema": { - "description": "Display config for the embeddable `` widget.\n\nServed without authentication for public agents; HTML attributes on the\nembed tag override every field. Grows alongside the Builder widget tab\n(greeting, policy switches, styles) \u2014 additions only, never renames.", + "description": "Display config for the embeddable `` widget.\n\nServed without authentication for public agents; HTML attributes on the\nembed tag override every field. Grows alongside the Builder widget tab\n(greeting, policy switches, styles) — additions only, never renames.", "properties": { "agent_name": { "title": "Agent Name", @@ -3479,7 +3479,7 @@ "/v1/agent/agents/{agent_id}/config": { "get": { "summary": "Get Draft Config", - "description": "Read the agent's current draft configuration \u2014 the state the next publish\nwill freeze. Sessions run the latest published version, not the draft; use\nthe versions endpoints to see what is live. Webhook signing secrets are\nwrite-only and reported as `has_secret`.", + "description": "Read the agent's current draft configuration — the state the next publish\nwill freeze. Sessions run the latest published version, not the draft; use\nthe versions endpoints to see what is live. Webhook signing secrets are\nwrite-only and reported as `has_secret`.", "security": [ { "BearerAuth": [] @@ -4540,7 +4540,7 @@ "/v1/agent/agents/{agent_id}/versions/{version_number}": { "get": { "summary": "Get Agent Version", - "description": "One published version with its full frozen configuration snapshot \u2014\nincluding the current live version. Secrets inside the snapshot are\nredacted the same way as the draft config.", + "description": "One published version with its full frozen configuration snapshot —\nincluding the current live version. Secrets inside the snapshot are\nredacted the same way as the draft config.", "security": [ { "BearerAuth": [] @@ -5009,7 +5009,7 @@ "/v1/agent/knowledge-sources": { "get": { "summary": "List Knowledge Sources", - "description": "List your team's knowledge sources, newest first. Paginate with `cursor`\n(follow `next_cursor` while `has_more` is true) or with `page` for offset\npagination with a `total` count \u2014 the two are mutually exclusive.", + "description": "List your team's knowledge sources, newest first. Paginate with `cursor`\n(follow `next_cursor` while `has_more` is true) or with `page` for offset\npagination with a `total` count — the two are mutually exclusive.", "security": [ { "BearerAuth": [] @@ -5796,7 +5796,7 @@ }, "patch": { "summary": "Update Knowledge Source", - "description": "Rename the source and/or replace its content by uploading a new file in\n`source` (multipart). Replacing content increments `revision_number` while\nthe id stays stable, and every attached agent's draft picks it up\nimmediately; published versions pin the revision they were published with,\nso republish each affected agent to put the new content live \u2014 that\ntwo-step (sync content, republish) is the nightly content-sync recipe.", + "description": "Rename the source and/or replace its content by uploading a new file in\n`source` (multipart). Replacing content increments `revision_number` while\nthe id stays stable, and every attached agent's draft picks it up\nimmediately; published versions pin the revision they were published with,\nso republish each affected agent to put the new content live — that\ntwo-step (sync content, republish) is the nightly content-sync recipe.", "security": [ { "BearerAuth": [] @@ -6131,7 +6131,7 @@ }, "delete": { "summary": "Delete Knowledge Source", - "description": "Delete a knowledge source. Returns 409 while any agent still references it\n\u2014 in its draft or in its currently published version (sessions resolve\nsources at call time, so deleting a published reference would change a\nrunning agent). Check `GET /v1/agent/knowledge-sources/{source_id}/agents`,\ndetach via the agent config, and republish if needed before deleting.", + "description": "Delete a knowledge source. Returns 409 while any agent still references it\n— in its draft or in its currently published version (sessions resolve\nsources at call time, so deleting a published reference would change a\nrunning agent). Check `GET /v1/agent/knowledge-sources/{source_id}/agents`,\ndetach via the agent config, and republish if needed before deleting.", "security": [ { "BearerAuth": [] @@ -6312,7 +6312,7 @@ "/v1/agent/knowledge-sources/{source_id}/agents": { "get": { "summary": "List Agents Using Knowledge Source", - "description": "Every agent that references this source in its draft or currently\npublished configuration \u2014 the pre-flight check before a delete.", + "description": "Every agent that references this source in its draft or currently\npublished configuration — the pre-flight check before a delete.", "security": [ { "BearerAuth": [] @@ -6481,7 +6481,7 @@ "/v1/agent/tools": { "get": { "summary": "List Tools", - "description": "List your team's tools, newest first. Filter with `agent_id` to see one\nagent's attached tools. Paginate with `cursor` (follow `next_cursor` while\n`has_more` is true) or with `page` for offset pagination with a `total`\ncount \u2014 the two are mutually exclusive.", + "description": "List your team's tools, newest first. Filter with `agent_id` to see one\nagent's attached tools. Paginate with `cursor` (follow `next_cursor` while\n`has_more` is true) or with `page` for offset pagination with a `total`\ncount — the two are mutually exclusive.", "security": [ { "BearerAuth": [] @@ -7083,7 +7083,7 @@ "/v1/agent/tools/{tool_id}": { "get": { "summary": "Get Tool", - "description": "Fetch one tool's full definition. Credential header values are never\nreturned \u2014 each credential header reports `has_secret` instead.", + "description": "Fetch one tool's full definition. Credential header values are never\nreturned — each credential header reports `has_secret` instead.", "security": [ { "BearerAuth": [] @@ -7360,7 +7360,7 @@ }, "patch": { "summary": "Update Tool", - "description": "Patch tool fields; omitted fields keep their value (null is rejected \u2014\nsend an empty string to clear a text field). `headers` replaces the header\nlist wholesale \u2014 include credential values again whenever you send it,\nsince reads never return them. Attached agents' drafts pick up the change\nimmediately; published versions stay frozen until re-published.", + "description": "Patch tool fields; omitted fields keep their value (null is rejected —\nsend an empty string to clear a text field). `headers` replaces the header\nlist wholesale — include credential values again whenever you send it,\nsince reads never return them. Attached agents' drafts pick up the change\nimmediately; published versions stay frozen until re-published.", "security": [ { "BearerAuth": [] @@ -7721,7 +7721,7 @@ }, "delete": { "summary": "Delete Tool", - "description": "Delete a tool. Returns 409 while any agent's draft configuration still\nreferences it \u2014 check `GET /v1/agent/tools/{tool_id}/agents` and detach it\nvia the agent config first, so a delete can never silently change agent\nbehavior.", + "description": "Delete a tool. Returns 409 while any agent's draft configuration still\nreferences it — check `GET /v1/agent/tools/{tool_id}/agents` and detach it\nvia the agent config first, so a delete can never silently change agent\nbehavior.", "security": [ { "BearerAuth": [] @@ -7902,7 +7902,7 @@ "/v1/agent/tools/{tool_id}/agents": { "get": { "summary": "List Agents Using Tool", - "description": "Every agent whose draft configuration references this tool \u2014 the\npre-flight check before a delete. Published versions keep executing their\nfrozen tool snapshot, so only draft references block deletion.", + "description": "Every agent whose draft configuration references this tool — the\npre-flight check before a delete. Published versions keep executing their\nfrozen tool snapshot, so only draft references block deletion.", "security": [ { "BearerAuth": [] @@ -8071,7 +8071,7 @@ "/v1/agent/phone-numbers": { "get": { "summary": "List Phone Numbers", - "description": "List your team's phone numbers, newest first. Released numbers are gone\nfor good and never appear. Look an id up by E.164 with `phone_number`, or\nfilter with `agent_id` to see one agent's numbers. Paginate with `cursor`\n(follow `next_cursor` while `has_more` is true) or with `page` for offset\npagination with a `total` count \u2014 the two are mutually exclusive.", + "description": "List your team's phone numbers, newest first. Released numbers are gone\nfor good and never appear. Look an id up by E.164 with `phone_number`, or\nfilter with `agent_id` to see one agent's numbers. Paginate with `cursor`\n(follow `next_cursor` while `has_more` is true) or with `page` for offset\npagination with a `total` count — the two are mutually exclusive.", "security": [ { "BearerAuth": [] @@ -8390,7 +8390,7 @@ }, "post": { "summary": "Purchase Phone Number", - "description": "Buy a number from the inventory. The number lands in your default\nworkspace, and any `agent_id` you bind must live there too. Billing is the\nmonthly price charged in daily slices: the first day is charged before\nanything is bought (402 costs you nothing), and the daily run advances it\nfrom there. 409 means the number is already on the platform; 502 means the\nprovider refused the purchase \u2014 the number stays visible with status\n`error` and is safe to release.", + "description": "Buy a number from the inventory. The number lands in your default\nworkspace, and any `agent_id` you bind must live there too. Billing is the\nmonthly price charged in daily slices: the first day is charged before\nanything is bought (402 costs you nothing), and the daily run advances it\nfrom there. 409 means the number is already on the platform; 502 means the\nprovider refused the purchase — the number stays visible with status\n`error` and is safe to release.", "security": [ { "BearerAuth": [] @@ -9024,7 +9024,7 @@ }, "patch": { "summary": "Update Phone Number", - "description": "Change the label and/or repoint the number at another agent \u2014 the\ndeployment-pipeline move (rebind from the staging agent to the production\none). Send `agent_id: null` to unbind; unbound numbers ring busy. The\nagent must live in the number's workspace. Rebinding is a routing-table\nupdate resolved on the next inbound call; nothing about the number itself\nis reprovisioned.", + "description": "Change the label and/or repoint the number at another agent — the\ndeployment-pipeline move (rebind from the staging agent to the production\none). Send `agent_id: null` to unbind; unbound numbers ring busy. The\nagent must live in the number's workspace. Rebinding is a routing-table\nupdate resolved on the next inbound call; nothing about the number itself\nis reprovisioned.", "security": [ { "BearerAuth": [] @@ -9296,7 +9296,7 @@ }, "delete": { "summary": "Release Phone Number", - "description": "Release a number back to the provider's inventory and stop its daily\nbilling. This is irreversible: anyone \u2014 including other platforms \u2014 can\nbuy the number afterwards, so callers who saved it may reach a stranger.\nThe number disappears from this API immediately.", + "description": "Release a number back to the provider's inventory and stop its daily\nbilling. This is irreversible: anyone — including other platforms — can\nbuy the number afterwards, so callers who saved it may reach a stranger.\nThe number disappears from this API immediately.", "security": [ { "BearerAuth": [] @@ -9437,127 +9437,89 @@ ] } }, - "/v1/asr": { + "/v1/agent/phone-calls": { "post": { - "summary": "Speech to Text", + "summary": "Create Phone Call", + "description": "Place an outbound call from one of your Twilio phone numbers to a US,\nCanada or Japan destination. A domestic trunk 0 after +81 (e.g.\n+81080...) is accepted and normalized to E.164 (+8180...). Returns\nimmediately with the session queued for\ndialing; subscribe to the `phone_call.dial_finished` webhook or poll\n`GET /v1/agent/sessions/{session_id}` for the dial outcome. Ringing is\nnever billed — metering starts when the callee answers.\n\nErrors carry a machine-readable `reason` (e.g. `destination_not_allowed`,\n`insufficient_credit`, `daily_limit_exceeded`,\n`concurrency_limit_exceeded`).", "security": [ { "BearerAuth": [] } ], + "parameters": [ + { + "in": "header", + "name": "idempotency-key", + "description": "Retry-safe replay key: the same key with the same body returns the call already placed instead of dialing again (24h window).", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Idempotency-Key" + }, + "deprecated": false + } + ], "requestBody": { "required": true, "content": { - "multipart/form-data": { - "schema": { - "properties": { - "audio": { - "description": "Audio file to be converted to text", - "format": "binary", - "title": "Audio", - "type": "string" - }, - "language": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Optional hint. The language is auto-detected regardless; the detected language is returned as `language_code`.", - "title": "Language" - }, - "ignore_timestamps": { - "default": true, - "description": "Whether to return precise timestamps in the text, this will increase the latency in audio shorter than 30 seconds", - "title": "Ignore Timestamps", - "type": "boolean" - } - }, - "required": [ - "audio" - ], - "type": "object" - } - }, - "application/msgpack": { + "application/json": { "schema": { - "properties": { - "audio": { - "description": "Audio file to be converted to text", - "format": "binary", - "title": "Audio", - "type": "string" - }, - "language": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Optional hint. The language is auto-detected regardless; the detected language is returned as `language_code`.", - "title": "Language" - }, - "ignore_timestamps": { - "default": true, - "description": "Whether to return precise timestamps in the text, this will increase the latency in audio shorter than 30 seconds", - "title": "Ignore Timestamps", - "type": "boolean" - } - }, - "required": [ - "audio" - ], - "type": "object" + "$ref": "#/components/schemas/PhoneCallCreatePayload" } } } }, "responses": { - "200": { - "description": "Request fulfilled, document follows", + "201": { + "description": "Document created, URL follows", "headers": {}, "content": { "application/json": { "schema": { "properties": { - "text": { - "title": "Text", + "session_id": { + "title": "Session Id", "type": "string" }, - "duration": { - "description": "Duration of the audio in seconds", - "title": "Duration", - "type": "number" - }, - "segments": { - "items": { - "$ref": "#/components/schemas/ASRSegment" - }, - "title": "Segments", - "type": "array" + "status": { + "const": "queued", + "default": "queued", + "title": "Status", + "type": "string" + } + }, + "required": [ + "session_id" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "No permission -- see authorization schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "language_code": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Detected language as an ISO 639-1 code (e.g. `en`, `ja`). Omitted if no language is detected.", - "title": "Language Code" + "message": { + "title": "Message", + "type": "string" }, - "language": { + "reason": { "anyOf": [ { "type": "string" @@ -9567,22 +9529,20 @@ } ], "default": null, - "description": "Detected language name (e.g. `English`). For display only; use `language_code` in code.", - "title": "Language" + "title": "Reason" } }, "required": [ - "text", - "duration", - "segments" + "status", + "message" ], "type": "object" } } } }, - "401": { - "description": "No permission -- see authorization schemes", + "402": { + "description": "No payment -- see charging schemes", "headers": {}, "content": { "application/json": { @@ -9618,8 +9578,8 @@ } } }, - "402": { - "description": "No payment -- see charging schemes", + "403": { + "description": "Request forbidden -- authorization will not help", "headers": {}, "content": { "application/json": { @@ -9655,8 +9615,8 @@ } } }, - "503": { - "description": "The server cannot process the request due to a high load", + "404": { + "description": "Nothing matches the given URI", "headers": {}, "content": { "application/json": { @@ -9691,70 +9651,9 @@ } } } - } - }, - "tags": [ - "OpenAPI v1" - ] - } - }, - "/v1/tts": { - "post": { - "summary": "Text to Speech", - "security": [ - { - "BearerAuth": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "model", - "description": "Specify which TTS model to use. Use `s2.1-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.", - "required": false, - "schema": { - "default": "s2.1-pro", - "enum": [ - "s1", - "s2-pro", - "s2.1-pro", - "s2.1-pro-free" - ], - "title": "Model", - "type": "string" - }, - "deprecated": false - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TTSRequest" - } - }, - "application/msgpack": { - "schema": { - "$ref": "#/components/schemas/TTSRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Request fulfilled, document follows", - "headers": { - "Transfer-Encoding": { - "schema": { - "type": "string" - }, - "description": "chunked" - } - } }, - "401": { - "description": "No permission -- see authorization schemes", + "409": { + "description": "Request conflict", "headers": {}, "content": { "application/json": { @@ -9790,8 +9689,8 @@ } } }, - "402": { - "description": "No payment -- see charging schemes", + "422": { + "description": "", "headers": {}, "content": { "application/json": { @@ -9827,8 +9726,45 @@ } } }, - "503": { - "description": "The server cannot process the request due to a high load", + "429": { + "description": "The user has sent too many requests in a given amount of time (\"rate limiting\")", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" + }, + "message": { + "title": "Message", + "type": "string" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "502": { + "description": "Invalid responses from another server/proxy", "headers": {}, "content": { "application/json": { @@ -9863,2103 +9799,217 @@ } } } - } - }, - "tags": [ - "OpenAPI v1" - ], - "x-codeSamples": [ - { - "lang": "bash", - "label": "Single Speaker", - "source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"Hello! Welcome to Fish Audio.\",\n \"reference_id\": \"model-id\",\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'" }, + "503": { + "description": "The server cannot process the request due to a high load", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" + }, + "message": { + "title": "Message", + "type": "string" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "Phone Calls" + ], + "x-codeSamples": [ { "lang": "bash", - "label": "Multi Speaker (S2 family only)", - "source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'" + "label": "Create Phone Call", + "source": "curl --request POST \\\n --url https://api.fish.audio/v1/agent/phone-calls \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'Idempotency-Key: ' \\\n --data '{\n \"agent_id\": \"\",\n \"phone_number_id\": \"\",\n \"to_number\": \"+14155550123\"\n }'" } ] } }, - "/v1/tts/stream/with-timestamp": { + "/v1/asr": { "post": { - "summary": "Text to Speech Stream with Timestamps", + "summary": "Speech to Text", "security": [ { "BearerAuth": [] } ], - "parameters": [ - { - "in": "header", - "name": "model", - "description": "Specify which TTS model to use. Use `s2.1-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.", - "required": false, - "schema": { - "default": "s2.1-pro", - "enum": [ - "s1", - "s2-pro", - "s2.1-pro", - "s2.1-pro-free" - ], - "title": "Model", - "type": "string" - }, - "deprecated": false - } - ], "requestBody": { "required": true, "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/TTSStreamWithTimestampRequest" + "properties": { + "audio": { + "description": "Audio file to be converted to text", + "format": "binary", + "title": "Audio", + "type": "string" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional hint. The language is auto-detected regardless; the detected language is returned as `language_code`.", + "title": "Language" + }, + "ignore_timestamps": { + "default": true, + "description": "Whether to return precise timestamps in the text, this will increase the latency in audio shorter than 30 seconds", + "title": "Ignore Timestamps", + "type": "boolean" + } + }, + "required": [ + "audio" + ], + "type": "object" } }, "application/msgpack": { "schema": { - "$ref": "#/components/schemas/TTSStreamWithTimestampRequest" + "properties": { + "audio": { + "description": "Audio file to be converted to text", + "format": "binary", + "title": "Audio", + "type": "string" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional hint. The language is auto-detected regardless; the detected language is returned as `language_code`.", + "title": "Language" + }, + "ignore_timestamps": { + "default": true, + "description": "Whether to return precise timestamps in the text, this will increase the latency in audio shorter than 30 seconds", + "title": "Ignore Timestamps", + "type": "boolean" + } + }, + "required": [ + "audio" + ], + "type": "object" } } } }, "responses": { "200": { - "description": "Server-Sent Events stream. Each `message` event contains a JSON payload with one base64 audio chunk. Concatenate every `audio_base64` chunk in arrival order to reconstruct the complete audio. `alignment` is the latest cumulative timestamp snapshot for `chunk_seq`; clients should replace the previous snapshot for that chunk instead of appending segments. `chunk_audio_offset_sec` can be added to segment times to derive absolute timestamps in the full audio.", - "headers": { - "Transfer-Encoding": { + "description": "Request fulfilled, document follows", + "headers": {}, + "content": { + "application/json": { "schema": { - "type": "string" - }, - "description": "chunked" + "properties": { + "text": { + "title": "Text", + "type": "string" + }, + "duration": { + "description": "Duration of the audio in seconds", + "title": "Duration", + "type": "number" + }, + "segments": { + "items": { + "$ref": "#/components/schemas/ASRSegment" + }, + "title": "Segments", + "type": "array" + }, + "language_code": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Detected language as an ISO 639-1 code (e.g. `en`, `ja`). Omitted if no language is detected.", + "title": "Language Code" + }, + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Detected language name (e.g. `English`). For display only; use `language_code` in code.", + "title": "Language" + } + }, + "required": [ + "text", + "duration", + "segments" + ], + "type": "object" + } } - }, + } + }, + "401": { + "description": "No permission -- see authorization schemes", + "headers": {}, "content": { - "text/event-stream": { + "application/json": { "schema": { - "description": "One Server-Sent Events message payload for streaming TTS with timestamps. Each event contains one audio chunk. Concatenate all `audio_base64` chunks in arrival order to reconstruct the complete audio. `alignment` is the latest cumulative timestamp snapshot for the reported `chunk_seq`; clients should replace the previous snapshot for that chunk instead of appending segments.", - "examples": [ - { - "alignment": { - "audio_duration": 16.24, - "segments": [ - { - "end": 0.16, - "start": 0, - "text": "I" - }, - { - "end": 0.48, - "start": 0.16, - "text": "can't" - }, - { - "end": 0.8, - "start": 0.48, - "text": "believe" - }, - { - "end": 1.12, - "start": 0.8, - "text": "its" - }, - { - "end": 1.44, - "start": 1.2, - "text": "been" - }, - { - "end": 1.76, - "start": 1.44, - "text": "this" - }, - { - "end": 2.48, - "start": 1.76, - "text": "long" - }, - { - "end": 2.64, - "start": 2.56, - "text": "It" - }, - { - "end": 3.04, - "start": 2.72, - "text": "feels" - }, - { - "end": 3.28, - "start": 3.12, - "text": "like" - }, - { - "end": 4, - "start": 3.36, - "text": "forever" - }, - { - "end": 4.32, - "start": 4, - "text": "since" - }, - { - "end": 4.48, - "start": 4.32, - "text": "we" - }, - { - "end": 4.96, - "start": 4.48, - "text": "last" - }, - { - "end": 5.28, - "start": 4.96, - "text": "really" - }, - { - "end": 5.84, - "start": 5.28, - "text": "talked" - }, - { - "end": 6.24, - "start": 6, - "text": "Ive" - }, - { - "end": 6.64, - "start": 6.24, - "text": "missed" - }, - { - "end": 6.96, - "start": 6.64, - "text": "hearing" - }, - { - "end": 7.2, - "start": 6.96, - "text": "your" - }, - { - "end": 7.76, - "start": 7.2, - "text": "voice" - }, - { - "end": 7.92, - "start": 7.76, - "text": "your" - }, - { - "end": 8.48, - "start": 7.92, - "text": "stories" - }, - { - "end": 8.72, - "start": 8.48, - "text": "even" - }, - { - "end": 8.8, - "start": 8.72, - "text": "the" - }, - { - "end": 9.2, - "start": 8.8, - "text": "little" - }, - { - "end": 9.52, - "start": 9.2, - "text": "things" - }, - { - "end": 9.68, - "start": 9.52, - "text": "you" - }, - { - "end": 10, - "start": 9.68, - "text": "used" - }, - { - "end": 10.08, - "start": 10, - "text": "to" - }, - { - "end": 10.64, - "start": 10.08, - "text": "say" - }, - { - "end": 10.96, - "start": 10.64, - "text": "How" - }, - { - "end": 11.12, - "start": 10.96, - "text": "have" - }, - { - "end": 11.36, - "start": 11.12, - "text": "you" - }, - { - "end": 11.92, - "start": 11.36, - "text": "been" - }, - { - "end": 12.24, - "start": 12, - "text": "Ive" - }, - { - "end": 12.48, - "start": 12.24, - "text": "thought" - }, - { - "end": 12.8, - "start": 12.48, - "text": "about" - }, - { - "end": 13.2, - "start": 12.8, - "text": "calling" - }, - { - "end": 13.36, - "start": 13.2, - "text": "you" - }, - { - "end": 13.68, - "start": 13.36, - "text": "so" - }, - { - "end": 13.92, - "start": 13.68, - "text": "many" - }, - { - "end": 14.56, - "start": 13.92, - "text": "times" - }, - { - "end": 14.72, - "start": 14.56, - "text": "but" - }, - { - "end": 14.88, - "start": 14.72, - "text": "I" - }, - { - "end": 15.2, - "start": 14.88, - "text": "never" - }, - { - "end": 15.36, - "start": 15.2, - "text": "knew" - }, - { - "end": 15.6, - "start": 15.36, - "text": "where" - }, - { - "end": 15.6, - "start": 15.6, - "text": "to" - }, - { - "end": 16.24, - "start": 15.68, - "text": "start" - } - ] - }, - "audio_base64": "SUQzBAAAAAAA...", - "chunk_audio_offset_sec": 0, - "chunk_seq": 0, - "content": "I can\u2019t believe it\u2019s been this long. It feels like forever since we last really talked. I\u2019ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I\u2019ve thought about calling you so many times, but I never knew where to start." + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - { - "alignment": { - "audio_duration": 16.24, - "segments": [ - { - "end": 0.16, - "start": 0, - "text": "I" - }, - { - "end": 0.48, - "start": 0.16, - "text": "can't" - }, - { - "end": 0.8, - "start": 0.48, - "text": "believe" - }, - { - "end": 1.12, - "start": 0.8, - "text": "its" - }, - { - "end": 1.44, - "start": 1.2, - "text": "been" - }, - { - "end": 1.76, - "start": 1.44, - "text": "this" - }, - { - "end": 2.48, - "start": 1.76, - "text": "long" - }, - { - "end": 2.64, - "start": 2.56, - "text": "It" - }, - { - "end": 3.04, - "start": 2.72, - "text": "feels" - }, - { - "end": 3.28, - "start": 3.12, - "text": "like" - }, - { - "end": 4, - "start": 3.36, - "text": "forever" - }, - { - "end": 4.32, - "start": 4, - "text": "since" - }, - { - "end": 4.48, - "start": 4.32, - "text": "we" - }, - { - "end": 4.96, - "start": 4.48, - "text": "last" - }, - { - "end": 5.28, - "start": 4.96, - "text": "really" - }, - { - "end": 5.84, - "start": 5.28, - "text": "talked" - }, - { - "end": 6.24, - "start": 6, - "text": "Ive" - }, - { - "end": 6.64, - "start": 6.24, - "text": "missed" - }, - { - "end": 6.96, - "start": 6.64, - "text": "hearing" - }, - { - "end": 7.2, - "start": 6.96, - "text": "your" - }, - { - "end": 7.76, - "start": 7.2, - "text": "voice" - }, - { - "end": 7.92, - "start": 7.76, - "text": "your" - }, - { - "end": 8.48, - "start": 7.92, - "text": "stories" - }, - { - "end": 8.72, - "start": 8.48, - "text": "even" - }, - { - "end": 8.8, - "start": 8.72, - "text": "the" - }, - { - "end": 9.2, - "start": 8.8, - "text": "little" - }, - { - "end": 9.52, - "start": 9.2, - "text": "things" - }, - { - "end": 9.68, - "start": 9.52, - "text": "you" - }, - { - "end": 10, - "start": 9.68, - "text": "used" - }, - { - "end": 10.08, - "start": 10, - "text": "to" - }, - { - "end": 10.64, - "start": 10.08, - "text": "say" - }, - { - "end": 10.96, - "start": 10.64, - "text": "How" - }, - { - "end": 11.12, - "start": 10.96, - "text": "have" - }, - { - "end": 11.36, - "start": 11.12, - "text": "you" - }, - { - "end": 11.92, - "start": 11.36, - "text": "been" - }, - { - "end": 12.24, - "start": 12, - "text": "Ive" - }, - { - "end": 12.48, - "start": 12.24, - "text": "thought" - }, - { - "end": 12.8, - "start": 12.48, - "text": "about" - }, - { - "end": 13.2, - "start": 12.8, - "text": "calling" - }, - { - "end": 13.36, - "start": 13.2, - "text": "you" - }, - { - "end": 13.68, - "start": 13.36, - "text": "so" - }, - { - "end": 13.92, - "start": 13.68, - "text": "many" - }, - { - "end": 14.56, - "start": 13.92, - "text": "times" - }, - { - "end": 14.72, - "start": 14.56, - "text": "but" - }, - { - "end": 14.88, - "start": 14.72, - "text": "I" - }, - { - "end": 15.2, - "start": 14.88, - "text": "never" - }, - { - "end": 15.36, - "start": 15.2, - "text": "knew" - }, - { - "end": 15.6, - "start": 15.36, - "text": "where" - }, - { - "end": 15.6, - "start": 15.6, - "text": "to" - }, - { - "end": 16.24, - "start": 15.68, - "text": "start" - } - ] - }, - "audio_base64": "//uSxOAAF...", - "chunk_audio_offset_sec": 0, - "chunk_seq": 0, - "content": "I can\u2019t believe it\u2019s been this long. It feels like forever since we last really talked. I\u2019ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I\u2019ve thought about calling you so many times, but I never knew where to start." - }, - { - "alignment": { - "audio_duration": 10.48, - "segments": [ - { - "end": 0.8, - "start": 0.4, - "text": "Seeing" - }, - { - "end": 0.96, - "start": 0.8, - "text": "you" - }, - { - "end": 1.44, - "start": 0.96, - "text": "again" - }, - { - "end": 1.68, - "start": 1.44, - "text": "now" - }, - { - "end": 2.08, - "start": 1.68, - "text": "makes" - }, - { - "end": 2.24, - "start": 2.08, - "text": "me" - }, - { - "end": 2.8, - "start": 2.24, - "text": "realize" - }, - { - "end": 3.12, - "start": 2.8, - "text": "just" - }, - { - "end": 3.28, - "start": 3.12, - "text": "how" - }, - { - "end": 3.6, - "start": 3.28, - "text": "much" - }, - { - "end": 3.76, - "start": 3.6, - "text": "Ive" - }, - { - "end": 4.24, - "start": 3.84, - "text": "missed" - }, - { - "end": 4.56, - "start": 4.24, - "text": "you" - }, - { - "end": 4.8, - "start": 4.64, - "text": "We" - }, - { - "end": 5.04, - "start": 4.8, - "text": "have" - }, - { - "end": 5.36, - "start": 5.04, - "text": "so" - }, - { - "end": 5.76, - "start": 5.36, - "text": "much" - }, - { - "end": 5.76, - "start": 5.76, - "text": "to" - }, - { - "end": 6.16, - "start": 5.76, - "text": "catch" - }, - { - "end": 6.4, - "start": 6.16, - "text": "up" - }, - { - "end": 6.72, - "start": 6.4, - "text": "on" - }, - { - "end": 6.96, - "start": 6.8, - "text": "and" - }, - { - "end": 7.04, - "start": 6.96, - "text": "I" - }, - { - "end": 7.36, - "start": 7.04, - "text": "dont" - }, - { - "end": 7.6, - "start": 7.36, - "text": "even" - }, - { - "end": 7.84, - "start": 7.6, - "text": "know" - }, - { - "end": 8.08, - "start": 7.84, - "text": "which" - }, - { - "end": 8.4, - "start": 8.08, - "text": "part" - }, - { - "end": 8.48, - "start": 8.4, - "text": "of" - }, - { - "end": 8.72, - "start": 8.56, - "text": "my" - }, - { - "end": 8.96, - "start": 8.72, - "text": "life" - }, - { - "end": 9.12, - "start": 9.12, - "text": "to" - }, - { - "end": 9.44, - "start": 9.12, - "text": "tell" - }, - { - "end": 9.6, - "start": 9.44, - "text": "you" - }, - { - "end": 10, - "start": 9.6, - "text": "about" - }, - { - "end": 10.48, - "start": 10.08, - "text": "first" - } - ] - }, - "audio_base64": "//uSxImAl...", - "chunk_audio_offset_sec": 16.24, - "chunk_seq": 1, - "content": "Seeing you again now makes me realize just how much I\u2019ve missed you. We have so much to catch up on, and I don\u2019t even know which part of my life to tell you about first." - } - ], - "properties": { - "audio_base64": { - "description": "Base64 encoded audio chunk. Concatenate every chunk in event order to reconstruct the full audio.", - "title": "Audio Base64", - "type": "string" - }, - "content": { - "description": "Text content described by this event's latest alignment snapshot. Long input may be split into multiple content chunks in one stream.", - "title": "Content", - "type": "string" - }, - "alignment": { - "anyOf": [ - { - "$ref": "#/components/schemas/TTSTimestampAlignment" - }, - { - "type": "null" - } - ], - "description": "Latest cumulative timestamp snapshot for `chunk_seq`. When present, replace the previous alignment for the same `chunk_seq`; do not append segments. Null means no alignment snapshot has been produced yet or alignment is unavailable." - }, - "chunk_seq": { - "description": "Sequence number of the text chunk described by `alignment`. Clients should bucket alignment snapshots by this value.", - "minimum": 0, - "title": "Chunk Seq", - "type": "integer" - }, - "chunk_audio_offset_sec": { - "description": "Absolute start time of this text chunk within the full audio, in seconds.", - "minimum": 0, - "title": "Chunk Audio Offset Sec", - "type": "number" - } - }, - "required": [ - "audio_base64", - "content", - "alignment", - "chunk_seq", - "chunk_audio_offset_sec" - ], - "title": "TTSTimestampStreamEvent", - "type": "object" - }, - "examples": { - "first_event": { - "summary": "First text chunk event with alignment", - "value": "data: {\"audio_base64\": \"SUQzBAAAAAAA...\", \"content\": \"I can\u2019t believe it\u2019s been this long. It feels like forever since we last really talked. I\u2019ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I\u2019ve thought about calling you so many times, but I never knew where to start.\", \"alignment\": {\"segments\": [{\"text\": \"I\", \"start\": 0.0, \"end\": 0.16}, {\"text\": \"can't\", \"start\": 0.16, \"end\": 0.48}, {\"text\": \"believe\", \"start\": 0.48, \"end\": 0.8}, {\"text\": \"its\", \"start\": 0.8, \"end\": 1.12}, {\"text\": \"been\", \"start\": 1.2, \"end\": 1.44}, {\"text\": \"this\", \"start\": 1.44, \"end\": 1.76}, {\"text\": \"long\", \"start\": 1.76, \"end\": 2.48}, {\"text\": \"It\", \"start\": 2.56, \"end\": 2.64}, {\"text\": \"feels\", \"start\": 2.72, \"end\": 3.04}, {\"text\": \"like\", \"start\": 3.12, \"end\": 3.28}, {\"text\": \"forever\", \"start\": 3.36, \"end\": 4.0}, {\"text\": \"since\", \"start\": 4.0, \"end\": 4.32}, {\"text\": \"we\", \"start\": 4.32, \"end\": 4.48}, {\"text\": \"last\", \"start\": 4.48, \"end\": 4.96}, {\"text\": \"really\", \"start\": 4.96, \"end\": 5.28}, {\"text\": \"talked\", \"start\": 5.28, \"end\": 5.84}, {\"text\": \"Ive\", \"start\": 6.0, \"end\": 6.24}, {\"text\": \"missed\", \"start\": 6.24, \"end\": 6.64}, {\"text\": \"hearing\", \"start\": 6.64, \"end\": 6.96}, {\"text\": \"your\", \"start\": 6.96, \"end\": 7.2}, {\"text\": \"voice\", \"start\": 7.2, \"end\": 7.76}, {\"text\": \"your\", \"start\": 7.76, \"end\": 7.92}, {\"text\": \"stories\", \"start\": 7.92, \"end\": 8.48}, {\"text\": \"even\", \"start\": 8.48, \"end\": 8.72}, {\"text\": \"the\", \"start\": 8.72, \"end\": 8.8}, {\"text\": \"little\", \"start\": 8.8, \"end\": 9.2}, {\"text\": \"things\", \"start\": 9.2, \"end\": 9.52}, {\"text\": \"you\", \"start\": 9.52, \"end\": 9.68}, {\"text\": \"used\", \"start\": 9.68, \"end\": 10.0}, {\"text\": \"to\", \"start\": 10.0, \"end\": 10.08}, {\"text\": \"say\", \"start\": 10.08, \"end\": 10.64}, {\"text\": \"How\", \"start\": 10.64, \"end\": 10.96}, {\"text\": \"have\", \"start\": 10.96, \"end\": 11.12}, {\"text\": \"you\", \"start\": 11.12, \"end\": 11.36}, {\"text\": \"been\", \"start\": 11.36, \"end\": 11.92}, {\"text\": \"Ive\", \"start\": 12.0, \"end\": 12.24}, {\"text\": \"thought\", \"start\": 12.24, \"end\": 12.48}, {\"text\": \"about\", \"start\": 12.48, \"end\": 12.8}, {\"text\": \"calling\", \"start\": 12.8, \"end\": 13.2}, {\"text\": \"you\", \"start\": 13.2, \"end\": 13.36}, {\"text\": \"so\", \"start\": 13.36, \"end\": 13.68}, {\"text\": \"many\", \"start\": 13.68, \"end\": 13.92}, {\"text\": \"times\", \"start\": 13.92, \"end\": 14.56}, {\"text\": \"but\", \"start\": 14.56, \"end\": 14.72}, {\"text\": \"I\", \"start\": 14.72, \"end\": 14.88}, {\"text\": \"never\", \"start\": 14.88, \"end\": 15.2}, {\"text\": \"knew\", \"start\": 15.2, \"end\": 15.36}, {\"text\": \"where\", \"start\": 15.36, \"end\": 15.6}, {\"text\": \"to\", \"start\": 15.6, \"end\": 15.6}, {\"text\": \"start\", \"start\": 15.68, \"end\": 16.24}], \"audio_duration\": 16.24}, \"chunk_seq\": 0, \"chunk_audio_offset_sec\": 0.0}\n\n" - }, - "following_event": { - "summary": "Following audio event with latest alignment snapshot", - "value": "data: {\"audio_base64\": \"//uSxOAAF...\", \"content\": \"I can\u2019t believe it\u2019s been this long. It feels like forever since we last really talked. I\u2019ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I\u2019ve thought about calling you so many times, but I never knew where to start.\", \"alignment\": {\"segments\": [{\"text\": \"I\", \"start\": 0.0, \"end\": 0.16}, {\"text\": \"can't\", \"start\": 0.16, \"end\": 0.48}, {\"text\": \"believe\", \"start\": 0.48, \"end\": 0.8}, {\"text\": \"its\", \"start\": 0.8, \"end\": 1.12}, {\"text\": \"been\", \"start\": 1.2, \"end\": 1.44}, {\"text\": \"this\", \"start\": 1.44, \"end\": 1.76}, {\"text\": \"long\", \"start\": 1.76, \"end\": 2.48}, {\"text\": \"It\", \"start\": 2.56, \"end\": 2.64}, {\"text\": \"feels\", \"start\": 2.72, \"end\": 3.04}, {\"text\": \"like\", \"start\": 3.12, \"end\": 3.28}, {\"text\": \"forever\", \"start\": 3.36, \"end\": 4.0}, {\"text\": \"since\", \"start\": 4.0, \"end\": 4.32}, {\"text\": \"we\", \"start\": 4.32, \"end\": 4.48}, {\"text\": \"last\", \"start\": 4.48, \"end\": 4.96}, {\"text\": \"really\", \"start\": 4.96, \"end\": 5.28}, {\"text\": \"talked\", \"start\": 5.28, \"end\": 5.84}, {\"text\": \"Ive\", \"start\": 6.0, \"end\": 6.24}, {\"text\": \"missed\", \"start\": 6.24, \"end\": 6.64}, {\"text\": \"hearing\", \"start\": 6.64, \"end\": 6.96}, {\"text\": \"your\", \"start\": 6.96, \"end\": 7.2}, {\"text\": \"voice\", \"start\": 7.2, \"end\": 7.76}, {\"text\": \"your\", \"start\": 7.76, \"end\": 7.92}, {\"text\": \"stories\", \"start\": 7.92, \"end\": 8.48}, {\"text\": \"even\", \"start\": 8.48, \"end\": 8.72}, {\"text\": \"the\", \"start\": 8.72, \"end\": 8.8}, {\"text\": \"little\", \"start\": 8.8, \"end\": 9.2}, {\"text\": \"things\", \"start\": 9.2, \"end\": 9.52}, {\"text\": \"you\", \"start\": 9.52, \"end\": 9.68}, {\"text\": \"used\", \"start\": 9.68, \"end\": 10.0}, {\"text\": \"to\", \"start\": 10.0, \"end\": 10.08}, {\"text\": \"say\", \"start\": 10.08, \"end\": 10.64}, {\"text\": \"How\", \"start\": 10.64, \"end\": 10.96}, {\"text\": \"have\", \"start\": 10.96, \"end\": 11.12}, {\"text\": \"you\", \"start\": 11.12, \"end\": 11.36}, {\"text\": \"been\", \"start\": 11.36, \"end\": 11.92}, {\"text\": \"Ive\", \"start\": 12.0, \"end\": 12.24}, {\"text\": \"thought\", \"start\": 12.24, \"end\": 12.48}, {\"text\": \"about\", \"start\": 12.48, \"end\": 12.8}, {\"text\": \"calling\", \"start\": 12.8, \"end\": 13.2}, {\"text\": \"you\", \"start\": 13.2, \"end\": 13.36}, {\"text\": \"so\", \"start\": 13.36, \"end\": 13.68}, {\"text\": \"many\", \"start\": 13.68, \"end\": 13.92}, {\"text\": \"times\", \"start\": 13.92, \"end\": 14.56}, {\"text\": \"but\", \"start\": 14.56, \"end\": 14.72}, {\"text\": \"I\", \"start\": 14.72, \"end\": 14.88}, {\"text\": \"never\", \"start\": 14.88, \"end\": 15.2}, {\"text\": \"knew\", \"start\": 15.2, \"end\": 15.36}, {\"text\": \"where\", \"start\": 15.36, \"end\": 15.6}, {\"text\": \"to\", \"start\": 15.6, \"end\": 15.6}, {\"text\": \"start\", \"start\": 15.68, \"end\": 16.24}], \"audio_duration\": 16.24}, \"chunk_seq\": 0, \"chunk_audio_offset_sec\": 0.0}\n\n" - }, - "later_text_chunk_event": { - "summary": "Later text chunk event with another alignment", - "value": "data: {\"audio_base64\": \"//uSxImAl...\", \"content\": \"Seeing you again now makes me realize just how much I\u2019ve missed you. We have so much to catch up on, and I don\u2019t even know which part of my life to tell you about first.\", \"alignment\": {\"segments\": [{\"text\": \"Seeing\", \"start\": 0.4, \"end\": 0.8}, {\"text\": \"you\", \"start\": 0.8, \"end\": 0.96}, {\"text\": \"again\", \"start\": 0.96, \"end\": 1.44}, {\"text\": \"now\", \"start\": 1.44, \"end\": 1.68}, {\"text\": \"makes\", \"start\": 1.68, \"end\": 2.08}, {\"text\": \"me\", \"start\": 2.08, \"end\": 2.24}, {\"text\": \"realize\", \"start\": 2.24, \"end\": 2.8}, {\"text\": \"just\", \"start\": 2.8, \"end\": 3.12}, {\"text\": \"how\", \"start\": 3.12, \"end\": 3.28}, {\"text\": \"much\", \"start\": 3.28, \"end\": 3.6}, {\"text\": \"Ive\", \"start\": 3.6, \"end\": 3.76}, {\"text\": \"missed\", \"start\": 3.84, \"end\": 4.24}, {\"text\": \"you\", \"start\": 4.24, \"end\": 4.56}, {\"text\": \"We\", \"start\": 4.64, \"end\": 4.8}, {\"text\": \"have\", \"start\": 4.8, \"end\": 5.04}, {\"text\": \"so\", \"start\": 5.04, \"end\": 5.36}, {\"text\": \"much\", \"start\": 5.36, \"end\": 5.76}, {\"text\": \"to\", \"start\": 5.76, \"end\": 5.76}, {\"text\": \"catch\", \"start\": 5.76, \"end\": 6.16}, {\"text\": \"up\", \"start\": 6.16, \"end\": 6.4}, {\"text\": \"on\", \"start\": 6.4, \"end\": 6.72}, {\"text\": \"and\", \"start\": 6.8, \"end\": 6.96}, {\"text\": \"I\", \"start\": 6.96, \"end\": 7.04}, {\"text\": \"dont\", \"start\": 7.04, \"end\": 7.36}, {\"text\": \"even\", \"start\": 7.36, \"end\": 7.6}, {\"text\": \"know\", \"start\": 7.6, \"end\": 7.84}, {\"text\": \"which\", \"start\": 7.84, \"end\": 8.08}, {\"text\": \"part\", \"start\": 8.08, \"end\": 8.4}, {\"text\": \"of\", \"start\": 8.4, \"end\": 8.48}, {\"text\": \"my\", \"start\": 8.56, \"end\": 8.72}, {\"text\": \"life\", \"start\": 8.72, \"end\": 8.96}, {\"text\": \"to\", \"start\": 9.12, \"end\": 9.12}, {\"text\": \"tell\", \"start\": 9.12, \"end\": 9.44}, {\"text\": \"you\", \"start\": 9.44, \"end\": 9.6}, {\"text\": \"about\", \"start\": 9.6, \"end\": 10.0}, {\"text\": \"first\", \"start\": 10.08, \"end\": 10.48}], \"audio_duration\": 10.48}, \"chunk_seq\": 1, \"chunk_audio_offset_sec\": 16.24}\n\n" - } - } - } - } - }, - "401": { - "description": "No permission -- see authorization schemes", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - }, - "402": { - "description": "No payment -- see charging schemes", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - }, - "503": { - "description": "The server cannot process the request due to a high load", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "OpenAPI v1" - ], - "x-codeSamples": [ - { - "lang": "bash", - "label": "Stream With Timestamps", - "source": "curl --no-buffer --request POST \\\n --url https://api.fish.audio/v1/tts/stream/with-timestamp \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"[happy] I can\u2019t believe it\u2019s been this long. It feels like forever since we last really talked. I\u2019ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I\u2019ve thought about calling you so many times, but I never knew where to start. Seeing you again now makes me realize just how much I\u2019ve missed you. We have so much to catch up on, and I don\u2019t even know which part of my life to tell you about first.\",\n \"format\": \"opus\",\n \"normalize\": true,\n \"temperature\": 0.9,\n \"chunk_length\": 100,\n \"top_p\": 0.9,\n \"latency\": \"balanced\",\n \"sample_rate\": 48000,\n \"reference_id\": \"fbe02f8306fc4d3d915e9871722a39d5\"\n }'" - } - ] - } - }, - "/v1/voice-design": { - "post": { - "summary": "Voice Design", - "security": [ - { - "BearerAuth": [] - } - ], - "parameters": [ - { - "in": "header", - "name": "model", - "description": "Specify which voice-design model to use.", - "required": true, - "schema": { - "const": "voice-design-1", - "default": "voice-design-1", - "title": "Model", - "type": "string" - }, - "deprecated": false - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VoiceDesignRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Request fulfilled, document follows", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "candidates": { - "description": "Generated voice candidates.", - "items": { - "$ref": "#/components/schemas/VoiceDesignCandidate" - }, - "title": "Candidates", - "type": "array" - } - }, - "required": [ - "candidates" - ], - "type": "object" - } - } - } - }, - "401": { - "description": "No permission -- see authorization schemes", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - }, - "402": { - "description": "No payment -- see charging schemes", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - }, - "503": { - "description": "The server cannot process the request due to a high load", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "OpenAPI v1" - ], - "x-codeSamples": [ - { - "lang": "bash", - "label": "Voice Design", - "source": "curl --request POST \\\n --url https://api.fish.audio/v1/voice-design \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: voice-design-1' \\\n --data '{\n \"instruction\": \"Warm, confident studio narrator with a natural tone\",\n \"reference_text\": \"Welcome to Fish Audio.\",\n \"language\": \"en\",\n \"n\": 2,\n \"speed\": 1,\n \"num_step\": 32,\n \"guidance_scale\": 2,\n \"instruct_guidance_scale\": 0,\n \"seed\": 42\n }'" - } - ] - } - }, - "/model": { - "get": { - "summary": "List Models", - "security": [ - { - "BearerAuth": [] - } - ], - "parameters": [ - { - "in": "query", - "name": "page_size", - "description": "Page size", - "required": false, - "schema": { - "default": 10, - "maximum": 100, - "minimum": 1, - "title": "Page Size", - "type": "integer" - }, - "deprecated": false - }, - { - "in": "query", - "name": "page_number", - "description": "Page number", - "required": false, - "schema": { - "default": 1, - "minimum": 1, - "title": "Page Number", - "type": "integer" - }, - "deprecated": false - }, - { - "in": "query", - "name": "title", - "description": "Title to filter models", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Title" - }, - "deprecated": false - }, - { - "in": "query", - "name": "tag", - "description": "Tag to filter models", - "required": false, - "schema": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Tag" - }, - "deprecated": false - }, - { - "in": "query", - "name": "self", - "description": "If True, return models owned by the active workspace", - "required": false, - "schema": { - "default": false, - "title": "Self", - "type": "boolean" - }, - "deprecated": false - }, - { - "in": "query", - "name": "author_id", - "description": "Author ID to filter public models; ignored if self is True", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Author Id" - }, - "deprecated": false - }, - { - "in": "query", - "name": "language", - "description": "Language to filter models", - "required": false, - "schema": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Language" - }, - "deprecated": false - }, - { - "in": "query", - "name": "title_language", - "description": "Title language to filter models", - "required": false, - "schema": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Title Language" - }, - "deprecated": false - }, - { - "in": "query", - "name": "sort_by", - "description": "", - "required": false, - "schema": { - "default": "score", - "enum": [ - "score", - "task_count", - "created_at" - ], - "title": "Sort By", - "type": "string" - }, - "deprecated": false - } - ], - "responses": { - "200": { - "description": "Request fulfilled, document follows", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "max_offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Max Offset" - }, - "accessible_upper_bound": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Accessible Upper Bound" - }, - "window_limited": { - "default": false, - "title": "Window Limited", - "type": "boolean" - }, - "total_is_exact": { - "default": true, - "title": "Total Is Exact", - "type": "boolean" - }, - "total": { - "title": "Total", - "type": "integer" - }, - "items": { - "items": { - "$ref": "#/components/schemas/ModelEntity" - }, - "title": "Items", - "type": "array" - }, - "has_more": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Has More" - } - }, - "required": [ - "total", - "items" - ], - "type": "object" - } - } - } - } - }, - "tags": [ - "Model" - ] - }, - "post": { - "summary": "Create Model for Users via API", - "security": [ - { - "BearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "visibility": { - "default": "public", - "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", - "enum": [ - "public", - "unlist", - "private" - ], - "title": "Visibility", - "type": "string" - }, - "type": { - "const": "tts", - "description": "Model type, tts is for text to speech", - "title": "Type", - "type": "string" - }, - "title": { - "description": "Model title or name", - "title": "Title", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model description", - "title": "Description" - }, - "cover_image": { - "anyOf": [ - { - "format": "binary", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model cover image, this is required if the model is public", - "title": "Cover Image" - }, - "train_mode": { - "const": "fast", - "description": "Model train mode, for TTS model, fast means model instantly available after creation", - "title": "Train Mode", - "type": "string" - }, - "voices": { - "anyOf": [ - { - "items": { - "format": "binary", - "type": "string" - }, - "maxItems": 20, - "minItems": 1, - "type": "array" - }, - { - "format": "binary", - "type": "string" - } - ], - "description": "Upload voices files that will be used to tune the model", - "title": "Voices" - }, - "texts": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "maxItems": 20, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", - "title": "Texts" - }, - "tags": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Model tags", - "title": "Tags" - }, - "enhance_audio_quality": { - "default": true, - "description": "Enhance audio quality", - "title": "Enhance Audio Quality", - "type": "boolean" - }, - "generate_sample": { - "default": false, - "description": "Generate default text", - "title": "Generate Sample", - "type": "boolean" - } - }, - "required": [ - "type", - "title", - "train_mode", - "voices" - ], - "type": "object" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "visibility": { - "default": "public", - "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", - "enum": [ - "public", - "unlist", - "private" - ], - "title": "Visibility", - "type": "string" - }, - "type": { - "const": "tts", - "description": "Model type, tts is for text to speech", - "title": "Type", - "type": "string" - }, - "title": { - "description": "Model title or name", - "title": "Title", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model description", - "title": "Description" - }, - "cover_image": { - "anyOf": [ - { - "format": "binary", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model cover image, this is required if the model is public", - "title": "Cover Image" - }, - "train_mode": { - "const": "fast", - "description": "Model train mode, for TTS model, fast means model instantly available after creation", - "title": "Train Mode", - "type": "string" - }, - "voices": { - "anyOf": [ - { - "items": { - "format": "binary", - "type": "string" - }, - "maxItems": 20, - "minItems": 1, - "type": "array" - }, - { - "format": "binary", - "type": "string" - } - ], - "description": "Upload voices files that will be used to tune the model", - "title": "Voices" - }, - "texts": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "maxItems": 20, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", - "title": "Texts" - }, - "tags": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Model tags", - "title": "Tags" - }, - "enhance_audio_quality": { - "default": true, - "description": "Enhance audio quality", - "title": "Enhance Audio Quality", - "type": "boolean" - }, - "generate_sample": { - "default": false, - "description": "Generate default text", - "title": "Generate Sample", - "type": "boolean" - } - }, - "required": [ - "type", - "title", - "train_mode", - "voices" - ], - "type": "object" - } - }, - "multipart/form-data": { - "schema": { - "properties": { - "visibility": { - "default": "public", - "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", - "enum": [ - "public", - "unlist", - "private" - ], - "title": "Visibility", - "type": "string" - }, - "type": { - "const": "tts", - "description": "Model type, tts is for text to speech", - "title": "Type", - "type": "string" - }, - "title": { - "description": "Model title or name", - "title": "Title", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model description", - "title": "Description" - }, - "cover_image": { - "anyOf": [ - { - "format": "binary", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model cover image, this is required if the model is public", - "title": "Cover Image" - }, - "train_mode": { - "const": "fast", - "description": "Model train mode, for TTS model, fast means model instantly available after creation", - "title": "Train Mode", - "type": "string" - }, - "voices": { - "anyOf": [ - { - "items": { - "format": "binary", - "type": "string" - }, - "maxItems": 20, - "minItems": 1, - "type": "array" - }, - { - "format": "binary", - "type": "string" - } - ], - "description": "Upload voices files that will be used to tune the model", - "title": "Voices" - }, - "texts": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "maxItems": 20, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", - "title": "Texts" - }, - "tags": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Model tags", - "title": "Tags" - }, - "enhance_audio_quality": { - "default": true, - "description": "Enhance audio quality", - "title": "Enhance Audio Quality", - "type": "boolean" - }, - "generate_sample": { - "default": false, - "description": "Generate default text", - "title": "Generate Sample", - "type": "boolean" - } - }, - "required": [ - "type", - "title", - "train_mode", - "voices" - ], - "type": "object" - } - }, - "application/msgpack": { - "schema": { - "properties": { - "visibility": { - "default": "public", - "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", - "enum": [ - "public", - "unlist", - "private" - ], - "title": "Visibility", - "type": "string" - }, - "type": { - "const": "tts", - "description": "Model type, tts is for text to speech", - "title": "Type", - "type": "string" - }, - "title": { - "description": "Model title or name", - "title": "Title", - "type": "string" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model description", - "title": "Description" - }, - "cover_image": { - "anyOf": [ - { - "format": "binary", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Model cover image, this is required if the model is public", - "title": "Cover Image" - }, - "train_mode": { - "const": "fast", - "description": "Model train mode, for TTS model, fast means model instantly available after creation", - "title": "Train Mode", - "type": "string" - }, - "voices": { - "anyOf": [ - { - "items": { - "format": "binary", - "type": "string" - }, - "maxItems": 20, - "minItems": 1, - "type": "array" - }, - { - "format": "binary", - "type": "string" - } - ], - "description": "Upload voices files that will be used to tune the model", - "title": "Voices" - }, - "texts": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "maxItems": 20, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", - "title": "Texts" - }, - "tags": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Model tags", - "title": "Tags" - }, - "enhance_audio_quality": { - "default": true, - "description": "Enhance audio quality", - "title": "Enhance Audio Quality", - "type": "boolean" - }, - "generate_sample": { - "default": false, - "description": "Generate default text", - "title": "Generate Sample", - "type": "boolean" - } - }, - "required": [ - "type", - "title", - "train_mode", - "voices" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "description": "Document created, URL follows", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "_id": { - "title": "Id", - "type": "string" - }, - "type": { - "enum": [ - "svc", - "tts" - ], - "title": "Type", - "type": "string" - }, - "title": { - "title": "Title", - "type": "string" - }, - "description": { - "default": "", - "title": "Description", - "type": "string" - }, - "cover_image": { - "default": "", - "title": "Cover Image", - "type": "string" - }, - "train_mode": { - "default": "full", - "enum": [ - "fast", - "full" - ], - "title": "Train Mode", - "type": "string" - }, - "state": { - "enum": [ - "created", - "training", - "trained", - "failed" - ], - "title": "State", - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "title": "Tags", - "type": "array" - }, - "samples": { - "default": [], - "items": { - "$ref": "#/components/schemas/SampleEntity" - }, - "title": "Samples", - "type": "array" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "updated_at": { - "format": "date-time", - "title": "Updated At", - "type": "string" - }, - "languages": { - "default": [], - "items": { - "type": "string" - }, - "title": "Languages", - "type": "array" - }, - "visibility": { - "enum": [ - "public", - "unlist", - "private" - ], - "title": "Visibility", - "type": "string" - }, - "lock_visibility": { - "default": false, - "title": "Lock Visibility", - "type": "boolean" - }, - "dmca_taken_down": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Dmca Taken Down" - }, - "default_text": { - "default": "", - "title": "Default Text", + "message": { + "title": "Message", "type": "string" }, - "source": { + "reason": { "anyOf": [ { "type": "string" @@ -11969,15 +10019,36 @@ } ], "default": null, - "title": "Source" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "402": { + "description": "No payment -- see charging schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "pvc_release_state": { + "message": { + "title": "Message", + "type": "string" + }, + "reason": { "anyOf": [ { - "enum": [ - "released", - "retiring" - ], "type": "string" }, { @@ -11985,24 +10056,36 @@ } ], "default": null, - "title": "Pvc Release State" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "503": { + "description": "The server cannot process the request due to a high load", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "pvc_notice_period_months": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Pvc Notice Period Months" + "message": { + "title": "Message", + "type": "string" }, - "pvc_released_at": { + "reason": { "anyOf": [ { - "format": "date-time", "type": "string" }, { @@ -12010,12 +10093,97 @@ } ], "default": null, - "title": "Pvc Released At" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "OpenAPI v1" + ] + } + }, + "/v1/tts": { + "post": { + "summary": "Text to Speech", + "security": [ + { + "BearerAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "model", + "description": "Specify which TTS model to use. Use `s2.1-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.", + "required": false, + "schema": { + "default": "s2.1-pro", + "enum": [ + "s1", + "s2-pro", + "s2.1-pro", + "s2.1-pro-free" + ], + "title": "Model", + "type": "string" + }, + "deprecated": false + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TTSRequest" + } + }, + "application/msgpack": { + "schema": { + "$ref": "#/components/schemas/TTSRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Request fulfilled, document follows", + "headers": { + "Transfer-Encoding": { + "schema": { + "type": "string" + }, + "description": "chunked" + } + } + }, + "401": { + "description": "No permission -- see authorization schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "pvc_retire_requested_at": { + "message": { + "title": "Message", + "type": "string" + }, + "reason": { "anyOf": [ { - "format": "date-time", "type": "string" }, { @@ -12023,12 +10191,36 @@ } ], "default": null, - "title": "Pvc Retire Requested At" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "402": { + "description": "No payment -- see charging schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "pvc_retire_effective_at": { + "message": { + "title": "Message", + "type": "string" + }, + "reason": { "anyOf": [ { - "format": "date-time", "type": "string" }, { @@ -12036,293 +10228,924 @@ } ], "default": null, - "title": "Pvc Retire Effective At" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "503": { + "description": "The server cannot process the request due to a high load", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "quality": { + "message": { + "title": "Message", + "type": "string" + }, + "reason": { "anyOf": [ { - "$ref": "#/components/schemas/ModelQualityEntity" + "type": "string" }, { "type": "null" } ], - "default": null - }, - "like_count": { - "title": "Like Count", - "type": "integer" - }, - "mark_count": { - "title": "Mark Count", - "type": "integer" - }, - "shared_count": { - "title": "Shared Count", - "type": "integer" - }, - "task_count": { - "title": "Task Count", - "type": "integer" - }, - "unliked": { - "default": false, - "title": "Unliked", - "type": "boolean" - }, - "liked": { - "default": false, - "title": "Liked", - "type": "boolean" + "default": null, + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "OpenAPI v1" + ], + "x-codeSamples": [ + { + "lang": "bash", + "label": "Single Speaker", + "source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"Hello! Welcome to Fish Audio.\",\n \"reference_id\": \"model-id\",\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'" + }, + { + "lang": "bash", + "label": "Multi Speaker (S2 family only)", + "source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'" + } + ] + } + }, + "/v1/tts/stream/with-timestamp": { + "post": { + "summary": "Text to Speech Stream with Timestamps", + "security": [ + { + "BearerAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "model", + "description": "Specify which TTS model to use. Use `s2.1-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.", + "required": false, + "schema": { + "default": "s2.1-pro", + "enum": [ + "s1", + "s2-pro", + "s2.1-pro", + "s2.1-pro-free" + ], + "title": "Model", + "type": "string" + }, + "deprecated": false + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TTSStreamWithTimestampRequest" + } + }, + "application/msgpack": { + "schema": { + "$ref": "#/components/schemas/TTSStreamWithTimestampRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Server-Sent Events stream. Each `message` event contains a JSON payload with one base64 audio chunk. Concatenate every `audio_base64` chunk in arrival order to reconstruct the complete audio. `alignment` is the latest cumulative timestamp snapshot for `chunk_seq`; clients should replace the previous snapshot for that chunk instead of appending segments. `chunk_audio_offset_sec` can be added to segment times to derive absolute timestamps in the full audio.", + "headers": { + "Transfer-Encoding": { + "schema": { + "type": "string" + }, + "description": "chunked" + } + }, + "content": { + "text/event-stream": { + "schema": { + "description": "One Server-Sent Events message payload for streaming TTS with timestamps. Each event contains one audio chunk. Concatenate all `audio_base64` chunks in arrival order to reconstruct the complete audio. `alignment` is the latest cumulative timestamp snapshot for the reported `chunk_seq`; clients should replace the previous snapshot for that chunk instead of appending segments.", + "examples": [ + { + "alignment": { + "audio_duration": 16.24, + "segments": [ + { + "end": 0.16, + "start": 0, + "text": "I" + }, + { + "end": 0.48, + "start": 0.16, + "text": "can't" + }, + { + "end": 0.8, + "start": 0.48, + "text": "believe" + }, + { + "end": 1.12, + "start": 0.8, + "text": "its" + }, + { + "end": 1.44, + "start": 1.2, + "text": "been" + }, + { + "end": 1.76, + "start": 1.44, + "text": "this" + }, + { + "end": 2.48, + "start": 1.76, + "text": "long" + }, + { + "end": 2.64, + "start": 2.56, + "text": "It" + }, + { + "end": 3.04, + "start": 2.72, + "text": "feels" + }, + { + "end": 3.28, + "start": 3.12, + "text": "like" + }, + { + "end": 4, + "start": 3.36, + "text": "forever" + }, + { + "end": 4.32, + "start": 4, + "text": "since" + }, + { + "end": 4.48, + "start": 4.32, + "text": "we" + }, + { + "end": 4.96, + "start": 4.48, + "text": "last" + }, + { + "end": 5.28, + "start": 4.96, + "text": "really" + }, + { + "end": 5.84, + "start": 5.28, + "text": "talked" + }, + { + "end": 6.24, + "start": 6, + "text": "Ive" + }, + { + "end": 6.64, + "start": 6.24, + "text": "missed" + }, + { + "end": 6.96, + "start": 6.64, + "text": "hearing" + }, + { + "end": 7.2, + "start": 6.96, + "text": "your" + }, + { + "end": 7.76, + "start": 7.2, + "text": "voice" + }, + { + "end": 7.92, + "start": 7.76, + "text": "your" + }, + { + "end": 8.48, + "start": 7.92, + "text": "stories" + }, + { + "end": 8.72, + "start": 8.48, + "text": "even" + }, + { + "end": 8.8, + "start": 8.72, + "text": "the" + }, + { + "end": 9.2, + "start": 8.8, + "text": "little" + }, + { + "end": 9.52, + "start": 9.2, + "text": "things" + }, + { + "end": 9.68, + "start": 9.52, + "text": "you" + }, + { + "end": 10, + "start": 9.68, + "text": "used" + }, + { + "end": 10.08, + "start": 10, + "text": "to" + }, + { + "end": 10.64, + "start": 10.08, + "text": "say" + }, + { + "end": 10.96, + "start": 10.64, + "text": "How" + }, + { + "end": 11.12, + "start": 10.96, + "text": "have" + }, + { + "end": 11.36, + "start": 11.12, + "text": "you" + }, + { + "end": 11.92, + "start": 11.36, + "text": "been" + }, + { + "end": 12.24, + "start": 12, + "text": "Ive" + }, + { + "end": 12.48, + "start": 12.24, + "text": "thought" + }, + { + "end": 12.8, + "start": 12.48, + "text": "about" + }, + { + "end": 13.2, + "start": 12.8, + "text": "calling" + }, + { + "end": 13.36, + "start": 13.2, + "text": "you" + }, + { + "end": 13.68, + "start": 13.36, + "text": "so" + }, + { + "end": 13.92, + "start": 13.68, + "text": "many" + }, + { + "end": 14.56, + "start": 13.92, + "text": "times" + }, + { + "end": 14.72, + "start": 14.56, + "text": "but" + }, + { + "end": 14.88, + "start": 14.72, + "text": "I" + }, + { + "end": 15.2, + "start": 14.88, + "text": "never" + }, + { + "end": 15.36, + "start": 15.2, + "text": "knew" + }, + { + "end": 15.6, + "start": 15.36, + "text": "where" + }, + { + "end": 15.6, + "start": 15.6, + "text": "to" + }, + { + "end": 16.24, + "start": 15.68, + "text": "start" + } + ] + }, + "audio_base64": "SUQzBAAAAAAA...", + "chunk_audio_offset_sec": 0, + "chunk_seq": 0, + "content": "I can’t believe it’s been this long. It feels like forever since we last really talked. I’ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I’ve thought about calling you so many times, but I never knew where to start." }, - "marked": { - "default": false, - "title": "Marked", - "type": "boolean" + { + "alignment": { + "audio_duration": 16.24, + "segments": [ + { + "end": 0.16, + "start": 0, + "text": "I" + }, + { + "end": 0.48, + "start": 0.16, + "text": "can't" + }, + { + "end": 0.8, + "start": 0.48, + "text": "believe" + }, + { + "end": 1.12, + "start": 0.8, + "text": "its" + }, + { + "end": 1.44, + "start": 1.2, + "text": "been" + }, + { + "end": 1.76, + "start": 1.44, + "text": "this" + }, + { + "end": 2.48, + "start": 1.76, + "text": "long" + }, + { + "end": 2.64, + "start": 2.56, + "text": "It" + }, + { + "end": 3.04, + "start": 2.72, + "text": "feels" + }, + { + "end": 3.28, + "start": 3.12, + "text": "like" + }, + { + "end": 4, + "start": 3.36, + "text": "forever" + }, + { + "end": 4.32, + "start": 4, + "text": "since" + }, + { + "end": 4.48, + "start": 4.32, + "text": "we" + }, + { + "end": 4.96, + "start": 4.48, + "text": "last" + }, + { + "end": 5.28, + "start": 4.96, + "text": "really" + }, + { + "end": 5.84, + "start": 5.28, + "text": "talked" + }, + { + "end": 6.24, + "start": 6, + "text": "Ive" + }, + { + "end": 6.64, + "start": 6.24, + "text": "missed" + }, + { + "end": 6.96, + "start": 6.64, + "text": "hearing" + }, + { + "end": 7.2, + "start": 6.96, + "text": "your" + }, + { + "end": 7.76, + "start": 7.2, + "text": "voice" + }, + { + "end": 7.92, + "start": 7.76, + "text": "your" + }, + { + "end": 8.48, + "start": 7.92, + "text": "stories" + }, + { + "end": 8.72, + "start": 8.48, + "text": "even" + }, + { + "end": 8.8, + "start": 8.72, + "text": "the" + }, + { + "end": 9.2, + "start": 8.8, + "text": "little" + }, + { + "end": 9.52, + "start": 9.2, + "text": "things" + }, + { + "end": 9.68, + "start": 9.52, + "text": "you" + }, + { + "end": 10, + "start": 9.68, + "text": "used" + }, + { + "end": 10.08, + "start": 10, + "text": "to" + }, + { + "end": 10.64, + "start": 10.08, + "text": "say" + }, + { + "end": 10.96, + "start": 10.64, + "text": "How" + }, + { + "end": 11.12, + "start": 10.96, + "text": "have" + }, + { + "end": 11.36, + "start": 11.12, + "text": "you" + }, + { + "end": 11.92, + "start": 11.36, + "text": "been" + }, + { + "end": 12.24, + "start": 12, + "text": "Ive" + }, + { + "end": 12.48, + "start": 12.24, + "text": "thought" + }, + { + "end": 12.8, + "start": 12.48, + "text": "about" + }, + { + "end": 13.2, + "start": 12.8, + "text": "calling" + }, + { + "end": 13.36, + "start": 13.2, + "text": "you" + }, + { + "end": 13.68, + "start": 13.36, + "text": "so" + }, + { + "end": 13.92, + "start": 13.68, + "text": "many" + }, + { + "end": 14.56, + "start": 13.92, + "text": "times" + }, + { + "end": 14.72, + "start": 14.56, + "text": "but" + }, + { + "end": 14.88, + "start": 14.72, + "text": "I" + }, + { + "end": 15.2, + "start": 14.88, + "text": "never" + }, + { + "end": 15.36, + "start": 15.2, + "text": "knew" + }, + { + "end": 15.6, + "start": 15.36, + "text": "where" + }, + { + "end": 15.6, + "start": 15.6, + "text": "to" + }, + { + "end": 16.24, + "start": 15.68, + "text": "start" + } + ] + }, + "audio_base64": "//uSxOAAF...", + "chunk_audio_offset_sec": 0, + "chunk_seq": 0, + "content": "I can’t believe it’s been this long. It feels like forever since we last really talked. I’ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I’ve thought about calling you so many times, but I never knew where to start." }, - "author": { - "$ref": "#/components/schemas/AuthorEntity" + { + "alignment": { + "audio_duration": 10.48, + "segments": [ + { + "end": 0.8, + "start": 0.4, + "text": "Seeing" + }, + { + "end": 0.96, + "start": 0.8, + "text": "you" + }, + { + "end": 1.44, + "start": 0.96, + "text": "again" + }, + { + "end": 1.68, + "start": 1.44, + "text": "now" + }, + { + "end": 2.08, + "start": 1.68, + "text": "makes" + }, + { + "end": 2.24, + "start": 2.08, + "text": "me" + }, + { + "end": 2.8, + "start": 2.24, + "text": "realize" + }, + { + "end": 3.12, + "start": 2.8, + "text": "just" + }, + { + "end": 3.28, + "start": 3.12, + "text": "how" + }, + { + "end": 3.6, + "start": 3.28, + "text": "much" + }, + { + "end": 3.76, + "start": 3.6, + "text": "Ive" + }, + { + "end": 4.24, + "start": 3.84, + "text": "missed" + }, + { + "end": 4.56, + "start": 4.24, + "text": "you" + }, + { + "end": 4.8, + "start": 4.64, + "text": "We" + }, + { + "end": 5.04, + "start": 4.8, + "text": "have" + }, + { + "end": 5.36, + "start": 5.04, + "text": "so" + }, + { + "end": 5.76, + "start": 5.36, + "text": "much" + }, + { + "end": 5.76, + "start": 5.76, + "text": "to" + }, + { + "end": 6.16, + "start": 5.76, + "text": "catch" + }, + { + "end": 6.4, + "start": 6.16, + "text": "up" + }, + { + "end": 6.72, + "start": 6.4, + "text": "on" + }, + { + "end": 6.96, + "start": 6.8, + "text": "and" + }, + { + "end": 7.04, + "start": 6.96, + "text": "I" + }, + { + "end": 7.36, + "start": 7.04, + "text": "dont" + }, + { + "end": 7.6, + "start": 7.36, + "text": "even" + }, + { + "end": 7.84, + "start": 7.6, + "text": "know" + }, + { + "end": 8.08, + "start": 7.84, + "text": "which" + }, + { + "end": 8.4, + "start": 8.08, + "text": "part" + }, + { + "end": 8.48, + "start": 8.4, + "text": "of" + }, + { + "end": 8.72, + "start": 8.56, + "text": "my" + }, + { + "end": 8.96, + "start": 8.72, + "text": "life" + }, + { + "end": 9.12, + "start": 9.12, + "text": "to" + }, + { + "end": 9.44, + "start": 9.12, + "text": "tell" + }, + { + "end": 9.6, + "start": 9.44, + "text": "you" + }, + { + "end": 10, + "start": 9.6, + "text": "about" + }, + { + "end": 10.48, + "start": 10.08, + "text": "first" + } + ] + }, + "audio_base64": "//uSxImAl...", + "chunk_audio_offset_sec": 16.24, + "chunk_seq": 1, + "content": "Seeing you again now makes me realize just how much I’ve missed you. We have so much to catch up on, and I don’t even know which part of my life to tell you about first." } - }, - "required": [ - "_id", - "type", - "title", - "state", - "tags", - "created_at", - "updated_at", - "visibility", - "like_count", - "mark_count", - "shared_count", - "task_count", - "author" ], - "type": "object" - } - } - } - }, - "401": { - "description": "No permission -- see authorization schemes", - "headers": {}, - "content": { - "application/json": { - "schema": { "properties": { - "status": { - "title": "Status", - "type": "integer" + "audio_base64": { + "description": "Base64 encoded audio chunk. Concatenate every chunk in event order to reconstruct the full audio.", + "title": "Audio Base64", + "type": "string" }, - "message": { - "title": "Message", + "content": { + "description": "Text content described by this event's latest alignment snapshot. Long input may be split into multiple content chunks in one stream.", + "title": "Content", "type": "string" }, - "reason": { + "alignment": { "anyOf": [ { - "type": "string" + "$ref": "#/components/schemas/TTSTimestampAlignment" }, { "type": "null" } ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - }, - "503": { - "description": "The server cannot process the request due to a high load", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" + "description": "Latest cumulative timestamp snapshot for `chunk_seq`. When present, replace the previous alignment for the same `chunk_seq`; do not append segments. Null means no alignment snapshot has been produced yet or alignment is unavailable." }, - "message": { - "title": "Message", - "type": "string" + "chunk_seq": { + "description": "Sequence number of the text chunk described by `alignment`. Clients should bucket alignment snapshots by this value.", + "minimum": 0, + "title": "Chunk Seq", + "type": "integer" }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" + "chunk_audio_offset_sec": { + "description": "Absolute start time of this text chunk within the full audio, in seconds.", + "minimum": 0, + "title": "Chunk Audio Offset Sec", + "type": "number" } }, "required": [ - "status", - "message" + "audio_base64", + "content", + "alignment", + "chunk_seq", + "chunk_audio_offset_sec" ], + "title": "TTSTimestampStreamEvent", "type": "object" + }, + "examples": { + "first_event": { + "summary": "First text chunk event with alignment", + "value": "data: {\"audio_base64\": \"SUQzBAAAAAAA...\", \"content\": \"I can’t believe it’s been this long. It feels like forever since we last really talked. I’ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I’ve thought about calling you so many times, but I never knew where to start.\", \"alignment\": {\"segments\": [{\"text\": \"I\", \"start\": 0.0, \"end\": 0.16}, {\"text\": \"can't\", \"start\": 0.16, \"end\": 0.48}, {\"text\": \"believe\", \"start\": 0.48, \"end\": 0.8}, {\"text\": \"its\", \"start\": 0.8, \"end\": 1.12}, {\"text\": \"been\", \"start\": 1.2, \"end\": 1.44}, {\"text\": \"this\", \"start\": 1.44, \"end\": 1.76}, {\"text\": \"long\", \"start\": 1.76, \"end\": 2.48}, {\"text\": \"It\", \"start\": 2.56, \"end\": 2.64}, {\"text\": \"feels\", \"start\": 2.72, \"end\": 3.04}, {\"text\": \"like\", \"start\": 3.12, \"end\": 3.28}, {\"text\": \"forever\", \"start\": 3.36, \"end\": 4.0}, {\"text\": \"since\", \"start\": 4.0, \"end\": 4.32}, {\"text\": \"we\", \"start\": 4.32, \"end\": 4.48}, {\"text\": \"last\", \"start\": 4.48, \"end\": 4.96}, {\"text\": \"really\", \"start\": 4.96, \"end\": 5.28}, {\"text\": \"talked\", \"start\": 5.28, \"end\": 5.84}, {\"text\": \"Ive\", \"start\": 6.0, \"end\": 6.24}, {\"text\": \"missed\", \"start\": 6.24, \"end\": 6.64}, {\"text\": \"hearing\", \"start\": 6.64, \"end\": 6.96}, {\"text\": \"your\", \"start\": 6.96, \"end\": 7.2}, {\"text\": \"voice\", \"start\": 7.2, \"end\": 7.76}, {\"text\": \"your\", \"start\": 7.76, \"end\": 7.92}, {\"text\": \"stories\", \"start\": 7.92, \"end\": 8.48}, {\"text\": \"even\", \"start\": 8.48, \"end\": 8.72}, {\"text\": \"the\", \"start\": 8.72, \"end\": 8.8}, {\"text\": \"little\", \"start\": 8.8, \"end\": 9.2}, {\"text\": \"things\", \"start\": 9.2, \"end\": 9.52}, {\"text\": \"you\", \"start\": 9.52, \"end\": 9.68}, {\"text\": \"used\", \"start\": 9.68, \"end\": 10.0}, {\"text\": \"to\", \"start\": 10.0, \"end\": 10.08}, {\"text\": \"say\", \"start\": 10.08, \"end\": 10.64}, {\"text\": \"How\", \"start\": 10.64, \"end\": 10.96}, {\"text\": \"have\", \"start\": 10.96, \"end\": 11.12}, {\"text\": \"you\", \"start\": 11.12, \"end\": 11.36}, {\"text\": \"been\", \"start\": 11.36, \"end\": 11.92}, {\"text\": \"Ive\", \"start\": 12.0, \"end\": 12.24}, {\"text\": \"thought\", \"start\": 12.24, \"end\": 12.48}, {\"text\": \"about\", \"start\": 12.48, \"end\": 12.8}, {\"text\": \"calling\", \"start\": 12.8, \"end\": 13.2}, {\"text\": \"you\", \"start\": 13.2, \"end\": 13.36}, {\"text\": \"so\", \"start\": 13.36, \"end\": 13.68}, {\"text\": \"many\", \"start\": 13.68, \"end\": 13.92}, {\"text\": \"times\", \"start\": 13.92, \"end\": 14.56}, {\"text\": \"but\", \"start\": 14.56, \"end\": 14.72}, {\"text\": \"I\", \"start\": 14.72, \"end\": 14.88}, {\"text\": \"never\", \"start\": 14.88, \"end\": 15.2}, {\"text\": \"knew\", \"start\": 15.2, \"end\": 15.36}, {\"text\": \"where\", \"start\": 15.36, \"end\": 15.6}, {\"text\": \"to\", \"start\": 15.6, \"end\": 15.6}, {\"text\": \"start\", \"start\": 15.68, \"end\": 16.24}], \"audio_duration\": 16.24}, \"chunk_seq\": 0, \"chunk_audio_offset_sec\": 0.0}\n\n" + }, + "following_event": { + "summary": "Following audio event with latest alignment snapshot", + "value": "data: {\"audio_base64\": \"//uSxOAAF...\", \"content\": \"I can’t believe it’s been this long. It feels like forever since we last really talked. I’ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I’ve thought about calling you so many times, but I never knew where to start.\", \"alignment\": {\"segments\": [{\"text\": \"I\", \"start\": 0.0, \"end\": 0.16}, {\"text\": \"can't\", \"start\": 0.16, \"end\": 0.48}, {\"text\": \"believe\", \"start\": 0.48, \"end\": 0.8}, {\"text\": \"its\", \"start\": 0.8, \"end\": 1.12}, {\"text\": \"been\", \"start\": 1.2, \"end\": 1.44}, {\"text\": \"this\", \"start\": 1.44, \"end\": 1.76}, {\"text\": \"long\", \"start\": 1.76, \"end\": 2.48}, {\"text\": \"It\", \"start\": 2.56, \"end\": 2.64}, {\"text\": \"feels\", \"start\": 2.72, \"end\": 3.04}, {\"text\": \"like\", \"start\": 3.12, \"end\": 3.28}, {\"text\": \"forever\", \"start\": 3.36, \"end\": 4.0}, {\"text\": \"since\", \"start\": 4.0, \"end\": 4.32}, {\"text\": \"we\", \"start\": 4.32, \"end\": 4.48}, {\"text\": \"last\", \"start\": 4.48, \"end\": 4.96}, {\"text\": \"really\", \"start\": 4.96, \"end\": 5.28}, {\"text\": \"talked\", \"start\": 5.28, \"end\": 5.84}, {\"text\": \"Ive\", \"start\": 6.0, \"end\": 6.24}, {\"text\": \"missed\", \"start\": 6.24, \"end\": 6.64}, {\"text\": \"hearing\", \"start\": 6.64, \"end\": 6.96}, {\"text\": \"your\", \"start\": 6.96, \"end\": 7.2}, {\"text\": \"voice\", \"start\": 7.2, \"end\": 7.76}, {\"text\": \"your\", \"start\": 7.76, \"end\": 7.92}, {\"text\": \"stories\", \"start\": 7.92, \"end\": 8.48}, {\"text\": \"even\", \"start\": 8.48, \"end\": 8.72}, {\"text\": \"the\", \"start\": 8.72, \"end\": 8.8}, {\"text\": \"little\", \"start\": 8.8, \"end\": 9.2}, {\"text\": \"things\", \"start\": 9.2, \"end\": 9.52}, {\"text\": \"you\", \"start\": 9.52, \"end\": 9.68}, {\"text\": \"used\", \"start\": 9.68, \"end\": 10.0}, {\"text\": \"to\", \"start\": 10.0, \"end\": 10.08}, {\"text\": \"say\", \"start\": 10.08, \"end\": 10.64}, {\"text\": \"How\", \"start\": 10.64, \"end\": 10.96}, {\"text\": \"have\", \"start\": 10.96, \"end\": 11.12}, {\"text\": \"you\", \"start\": 11.12, \"end\": 11.36}, {\"text\": \"been\", \"start\": 11.36, \"end\": 11.92}, {\"text\": \"Ive\", \"start\": 12.0, \"end\": 12.24}, {\"text\": \"thought\", \"start\": 12.24, \"end\": 12.48}, {\"text\": \"about\", \"start\": 12.48, \"end\": 12.8}, {\"text\": \"calling\", \"start\": 12.8, \"end\": 13.2}, {\"text\": \"you\", \"start\": 13.2, \"end\": 13.36}, {\"text\": \"so\", \"start\": 13.36, \"end\": 13.68}, {\"text\": \"many\", \"start\": 13.68, \"end\": 13.92}, {\"text\": \"times\", \"start\": 13.92, \"end\": 14.56}, {\"text\": \"but\", \"start\": 14.56, \"end\": 14.72}, {\"text\": \"I\", \"start\": 14.72, \"end\": 14.88}, {\"text\": \"never\", \"start\": 14.88, \"end\": 15.2}, {\"text\": \"knew\", \"start\": 15.2, \"end\": 15.36}, {\"text\": \"where\", \"start\": 15.36, \"end\": 15.6}, {\"text\": \"to\", \"start\": 15.6, \"end\": 15.6}, {\"text\": \"start\", \"start\": 15.68, \"end\": 16.24}], \"audio_duration\": 16.24}, \"chunk_seq\": 0, \"chunk_audio_offset_sec\": 0.0}\n\n" + }, + "later_text_chunk_event": { + "summary": "Later text chunk event with another alignment", + "value": "data: {\"audio_base64\": \"//uSxImAl...\", \"content\": \"Seeing you again now makes me realize just how much I’ve missed you. We have so much to catch up on, and I don’t even know which part of my life to tell you about first.\", \"alignment\": {\"segments\": [{\"text\": \"Seeing\", \"start\": 0.4, \"end\": 0.8}, {\"text\": \"you\", \"start\": 0.8, \"end\": 0.96}, {\"text\": \"again\", \"start\": 0.96, \"end\": 1.44}, {\"text\": \"now\", \"start\": 1.44, \"end\": 1.68}, {\"text\": \"makes\", \"start\": 1.68, \"end\": 2.08}, {\"text\": \"me\", \"start\": 2.08, \"end\": 2.24}, {\"text\": \"realize\", \"start\": 2.24, \"end\": 2.8}, {\"text\": \"just\", \"start\": 2.8, \"end\": 3.12}, {\"text\": \"how\", \"start\": 3.12, \"end\": 3.28}, {\"text\": \"much\", \"start\": 3.28, \"end\": 3.6}, {\"text\": \"Ive\", \"start\": 3.6, \"end\": 3.76}, {\"text\": \"missed\", \"start\": 3.84, \"end\": 4.24}, {\"text\": \"you\", \"start\": 4.24, \"end\": 4.56}, {\"text\": \"We\", \"start\": 4.64, \"end\": 4.8}, {\"text\": \"have\", \"start\": 4.8, \"end\": 5.04}, {\"text\": \"so\", \"start\": 5.04, \"end\": 5.36}, {\"text\": \"much\", \"start\": 5.36, \"end\": 5.76}, {\"text\": \"to\", \"start\": 5.76, \"end\": 5.76}, {\"text\": \"catch\", \"start\": 5.76, \"end\": 6.16}, {\"text\": \"up\", \"start\": 6.16, \"end\": 6.4}, {\"text\": \"on\", \"start\": 6.4, \"end\": 6.72}, {\"text\": \"and\", \"start\": 6.8, \"end\": 6.96}, {\"text\": \"I\", \"start\": 6.96, \"end\": 7.04}, {\"text\": \"dont\", \"start\": 7.04, \"end\": 7.36}, {\"text\": \"even\", \"start\": 7.36, \"end\": 7.6}, {\"text\": \"know\", \"start\": 7.6, \"end\": 7.84}, {\"text\": \"which\", \"start\": 7.84, \"end\": 8.08}, {\"text\": \"part\", \"start\": 8.08, \"end\": 8.4}, {\"text\": \"of\", \"start\": 8.4, \"end\": 8.48}, {\"text\": \"my\", \"start\": 8.56, \"end\": 8.72}, {\"text\": \"life\", \"start\": 8.72, \"end\": 8.96}, {\"text\": \"to\", \"start\": 9.12, \"end\": 9.12}, {\"text\": \"tell\", \"start\": 9.12, \"end\": 9.44}, {\"text\": \"you\", \"start\": 9.44, \"end\": 9.6}, {\"text\": \"about\", \"start\": 9.6, \"end\": 10.0}, {\"text\": \"first\", \"start\": 10.08, \"end\": 10.48}], \"audio_duration\": 10.48}, \"chunk_seq\": 1, \"chunk_audio_offset_sec\": 16.24}\n\n" + } } } } - } - }, - "tags": [ - "Model" - ] - } - }, - "/model/{id}": { - "get": { - "summary": "Get Model", - "security": [ - { - "BearerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "id", - "description": "", - "required": true, - "schema": { - "title": "Id", - "type": "string" - }, - "deprecated": false - } - ], - "responses": { - "200": { - "description": "Request fulfilled, document follows", + }, + "401": { + "description": "No permission -- see authorization schemes", "headers": {}, "content": { "application/json": { "schema": { "properties": { - "_id": { - "title": "Id", - "type": "string" - }, - "type": { - "enum": [ - "svc", - "tts" - ], - "title": "Type", - "type": "string" - }, - "title": { - "title": "Title", - "type": "string" - }, - "description": { - "default": "", - "title": "Description", - "type": "string" - }, - "cover_image": { - "default": "", - "title": "Cover Image", - "type": "string" - }, - "train_mode": { - "default": "full", - "enum": [ - "fast", - "full" - ], - "title": "Train Mode", - "type": "string" - }, - "state": { - "enum": [ - "created", - "training", - "trained", - "failed" - ], - "title": "State", - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "title": "Tags", - "type": "array" - }, - "samples": { - "default": [], - "items": { - "$ref": "#/components/schemas/SampleEntity" - }, - "title": "Samples", - "type": "array" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "updated_at": { - "format": "date-time", - "title": "Updated At", - "type": "string" - }, - "languages": { - "default": [], - "items": { - "type": "string" - }, - "title": "Languages", - "type": "array" - }, - "visibility": { - "enum": [ - "public", - "unlist", - "private" - ], - "title": "Visibility", - "type": "string" - }, - "lock_visibility": { - "default": false, - "title": "Lock Visibility", - "type": "boolean" - }, - "dmca_taken_down": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "title": "Dmca Taken Down" + "status": { + "title": "Status", + "type": "integer" }, - "default_text": { - "default": "", - "title": "Default Text", + "message": { + "title": "Message", "type": "string" }, - "source": { + "reason": { "anyOf": [ { "type": "string" @@ -12332,15 +11155,36 @@ } ], "default": null, - "title": "Source" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "402": { + "description": "No payment -- see charging schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "pvc_release_state": { + "message": { + "title": "Message", + "type": "string" + }, + "reason": { "anyOf": [ { - "enum": [ - "released", - "retiring" - ], "type": "string" }, { @@ -12348,24 +11192,36 @@ } ], "default": null, - "title": "Pvc Release State" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "503": { + "description": "The server cannot process the request due to a high load", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "pvc_notice_period_months": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Pvc Notice Period Months" + "message": { + "title": "Message", + "type": "string" }, - "pvc_released_at": { + "reason": { "anyOf": [ { - "format": "date-time", "type": "string" }, { @@ -12373,25 +11229,107 @@ } ], "default": null, - "title": "Pvc Released At" + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + } + }, + "tags": [ + "OpenAPI v1" + ], + "x-codeSamples": [ + { + "lang": "bash", + "label": "Stream With Timestamps", + "source": "curl --no-buffer --request POST \\\n --url https://api.fish.audio/v1/tts/stream/with-timestamp \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"[happy] I can’t believe it’s been this long. It feels like forever since we last really talked. I’ve missed hearing your voice, your stories, even the little things you used to say. How have you been? I’ve thought about calling you so many times, but I never knew where to start. Seeing you again now makes me realize just how much I’ve missed you. We have so much to catch up on, and I don’t even know which part of my life to tell you about first.\",\n \"format\": \"opus\",\n \"normalize\": true,\n \"temperature\": 0.9,\n \"chunk_length\": 100,\n \"top_p\": 0.9,\n \"latency\": \"balanced\",\n \"sample_rate\": 48000,\n \"reference_id\": \"fbe02f8306fc4d3d915e9871722a39d5\"\n }'" + } + ] + } + }, + "/v1/voice-design": { + "post": { + "summary": "Voice Design", + "security": [ + { + "BearerAuth": [] + } + ], + "parameters": [ + { + "in": "header", + "name": "model", + "description": "Specify which voice-design model to use.", + "required": true, + "schema": { + "const": "voice-design-1", + "default": "voice-design-1", + "title": "Model", + "type": "string" + }, + "deprecated": false + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VoiceDesignRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Request fulfilled, document follows", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "candidates": { + "description": "Generated voice candidates.", + "items": { + "$ref": "#/components/schemas/VoiceDesignCandidate" + }, + "title": "Candidates", + "type": "array" + } + }, + "required": [ + "candidates" + ], + "type": "object" + } + } + } + }, + "401": { + "description": "No permission -- see authorization schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", + "type": "integer" }, - "pvc_retire_requested_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Pvc Retire Requested At" + "message": { + "title": "Message", + "type": "string" }, - "pvc_retire_effective_at": { + "reason": { "anyOf": [ { - "format": "date-time", "type": "string" }, { @@ -12399,76 +11337,57 @@ } ], "default": null, - "title": "Pvc Retire Effective At" - }, - "quality": { - "anyOf": [ - { - "$ref": "#/components/schemas/ModelQualityEntity" - }, - { - "type": "null" - } - ], - "default": null - }, - "like_count": { - "title": "Like Count", - "type": "integer" - }, - "mark_count": { - "title": "Mark Count", - "type": "integer" - }, - "shared_count": { - "title": "Shared Count", - "type": "integer" - }, - "task_count": { - "title": "Task Count", + "title": "Reason" + } + }, + "required": [ + "status", + "message" + ], + "type": "object" + } + } + } + }, + "402": { + "description": "No payment -- see charging schemes", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "title": "Status", "type": "integer" }, - "unliked": { - "default": false, - "title": "Unliked", - "type": "boolean" - }, - "liked": { - "default": false, - "title": "Liked", - "type": "boolean" - }, - "marked": { - "default": false, - "title": "Marked", - "type": "boolean" + "message": { + "title": "Message", + "type": "string" }, - "author": { - "$ref": "#/components/schemas/AuthorEntity" + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Reason" } }, "required": [ - "_id", - "type", - "title", - "state", - "tags", - "created_at", - "updated_at", - "visibility", - "like_count", - "mark_count", - "shared_count", - "task_count", - "author" + "status", + "message" ], "type": "object" } } } }, - "403": { - "description": "Request forbidden -- authorization will not help", + "503": { + "description": "The server cannot process the request due to a high load", "headers": {}, "content": { "application/json": { @@ -12503,38 +11422,268 @@ } } } + } + }, + "tags": [ + "OpenAPI v1" + ], + "x-codeSamples": [ + { + "lang": "bash", + "label": "Voice Design", + "source": "curl --request POST \\\n --url https://api.fish.audio/v1/voice-design \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'model: voice-design-1' \\\n --data '{\n \"instruction\": \"Warm, confident studio narrator with a natural tone\",\n \"reference_text\": \"Welcome to Fish Audio.\",\n \"language\": \"en\",\n \"n\": 2,\n \"speed\": 1,\n \"num_step\": 32,\n \"guidance_scale\": 2,\n \"instruct_guidance_scale\": 0,\n \"seed\": 42\n }'" + } + ] + } + }, + "/model": { + "get": { + "summary": "List Models", + "security": [ + { + "BearerAuth": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "page_size", + "description": "Page size", + "required": false, + "schema": { + "default": 10, + "maximum": 100, + "minimum": 1, + "title": "Page Size", + "type": "integer" + }, + "deprecated": false }, - "404": { - "description": "Nothing matches the given URI", + { + "in": "query", + "name": "page_number", + "description": "Page number", + "required": false, + "schema": { + "default": 1, + "minimum": 1, + "title": "Page Number", + "type": "integer" + }, + "deprecated": false + }, + { + "in": "query", + "name": "title", + "description": "Title to filter models", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "deprecated": false + }, + { + "in": "query", + "name": "tag", + "description": "Tag to filter models", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Tag" + }, + "deprecated": false + }, + { + "in": "query", + "name": "self", + "description": "If True, return models owned by the active workspace", + "required": false, + "schema": { + "default": false, + "title": "Self", + "type": "boolean" + }, + "deprecated": false + }, + { + "in": "query", + "name": "author_id", + "description": "Author ID to filter public models; ignored if self is True", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Author Id" + }, + "deprecated": false + }, + { + "in": "query", + "name": "language", + "description": "Language to filter models", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Language" + }, + "deprecated": false + }, + { + "in": "query", + "name": "title_language", + "description": "Title language to filter models", + "required": false, + "schema": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title Language" + }, + "deprecated": false + }, + { + "in": "query", + "name": "sort_by", + "description": "", + "required": false, + "schema": { + "default": "score", + "enum": [ + "score", + "task_count", + "created_at" + ], + "title": "Sort By", + "type": "string" + }, + "deprecated": false + } + ], + "responses": { + "200": { + "description": "Request fulfilled, document follows", "headers": {}, "content": { "application/json": { "schema": { "properties": { - "status": { - "title": "Status", + "max_offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Max Offset" + }, + "accessible_upper_bound": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Accessible Upper Bound" + }, + "window_limited": { + "default": false, + "title": "Window Limited", + "type": "boolean" + }, + "total_is_exact": { + "default": true, + "title": "Total Is Exact", + "type": "boolean" + }, + "total": { + "title": "Total", "type": "integer" }, - "message": { - "title": "Message", - "type": "string" + "items": { + "items": { + "$ref": "#/components/schemas/ModelEntity" + }, + "title": "Items", + "type": "array" }, - "reason": { + "has_more": { "anyOf": [ { - "type": "string" + "type": "boolean" }, { "type": "null" } ], "default": null, - "title": "Reason" + "title": "Has More" } }, "required": [ - "status", - "message" + "total", + "items" ], "type": "object" } @@ -12546,33 +11695,42 @@ "Model" ] }, - "patch": { - "summary": "Update Model", + "post": { + "summary": "Create Model for Users via API", "security": [ { "BearerAuth": [] } ], - "parameters": [ - { - "in": "path", - "name": "id", - "description": "", - "required": true, - "schema": { - "title": "Id", - "type": "string" - }, - "deprecated": false - } - ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { + "visibility": { + "default": "public", + "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", + "enum": [ + "public", + "unlist", + "private" + ], + "title": "Visibility", + "type": "string" + }, + "type": { + "const": "tts", + "description": "Model type, tts is for text to speech", + "title": "Type", + "type": "string" + }, "title": { + "description": "Model title or name", + "title": "Title", + "type": "string" + }, + "description": { "anyOf": [ { "type": "string" @@ -12582,7 +11740,132 @@ } ], "default": null, - "title": "Title" + "description": "Model description", + "title": "Description" + }, + "cover_image": { + "anyOf": [ + { + "format": "binary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Model cover image, this is required if the model is public", + "title": "Cover Image" + }, + "train_mode": { + "const": "fast", + "description": "Model train mode, for TTS model, fast means model instantly available after creation", + "title": "Train Mode", + "type": "string" + }, + "voices": { + "anyOf": [ + { + "items": { + "format": "binary", + "type": "string" + }, + "maxItems": 20, + "minItems": 1, + "type": "array" + }, + { + "format": "binary", + "type": "string" + } + ], + "description": "Upload voices files that will be used to tune the model", + "title": "Voices" + }, + "texts": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", + "title": "Texts" + }, + "tags": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Model tags", + "title": "Tags" + }, + "enhance_audio_quality": { + "default": true, + "description": "Enhance audio quality", + "title": "Enhance Audio Quality", + "type": "boolean" + }, + "generate_sample": { + "default": false, + "description": "Generate default text", + "title": "Generate Sample", + "type": "boolean" + } + }, + "required": [ + "type", + "title", + "train_mode", + "voices" + ], + "type": "object" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "visibility": { + "default": "public", + "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", + "enum": [ + "public", + "unlist", + "private" + ], + "title": "Visibility", + "type": "string" + }, + "type": { + "const": "tts", + "description": "Model type, tts is for text to speech", + "title": "Type", + "type": "string" + }, + "title": { + "description": "Model title or name", + "title": "Title", + "type": "string" }, "description": { "anyOf": [ @@ -12594,6 +11877,7 @@ } ], "default": null, + "description": "Model description", "title": "Description" }, "cover_image": { @@ -12607,16 +11891,44 @@ } ], "default": null, + "description": "Model cover image, this is required if the model is public", "title": "Cover Image" }, - "visibility": { + "train_mode": { + "const": "fast", + "description": "Model train mode, for TTS model, fast means model instantly available after creation", + "title": "Train Mode", + "type": "string" + }, + "voices": { "anyOf": [ { - "enum": [ - "public", - "unlist", - "private" - ], + "items": { + "format": "binary", + "type": "string" + }, + "maxItems": 20, + "minItems": 1, + "type": "array" + }, + { + "format": "binary", + "type": "string" + } + ], + "description": "Upload voices files that will be used to tune the model", + "title": "Voices" + }, + "texts": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + { "type": "string" }, { @@ -12624,7 +11936,8 @@ } ], "default": null, - "title": "Visibility" + "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", + "title": "Texts" }, "tags": { "anyOf": [ @@ -12636,18 +11949,62 @@ }, { "type": "string" + }, + { + "type": "null" } ], + "description": "Model tags", "title": "Tags" + }, + "enhance_audio_quality": { + "default": true, + "description": "Enhance audio quality", + "title": "Enhance Audio Quality", + "type": "boolean" + }, + "generate_sample": { + "default": false, + "description": "Generate default text", + "title": "Generate Sample", + "type": "boolean" } }, + "required": [ + "type", + "title", + "train_mode", + "voices" + ], "type": "object" } }, - "application/x-www-form-urlencoded": { + "multipart/form-data": { "schema": { "properties": { + "visibility": { + "default": "public", + "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", + "enum": [ + "public", + "unlist", + "private" + ], + "title": "Visibility", + "type": "string" + }, + "type": { + "const": "tts", + "description": "Model type, tts is for text to speech", + "title": "Type", + "type": "string" + }, "title": { + "description": "Model title or name", + "title": "Title", + "type": "string" + }, + "description": { "anyOf": [ { "type": "string" @@ -12657,11 +12014,13 @@ } ], "default": null, - "title": "Title" + "description": "Model description", + "title": "Description" }, - "description": { + "cover_image": { "anyOf": [ { + "format": "binary", "type": "string" }, { @@ -12669,29 +12028,44 @@ } ], "default": null, - "title": "Description" + "description": "Model cover image, this is required if the model is public", + "title": "Cover Image" }, - "cover_image": { + "train_mode": { + "const": "fast", + "description": "Model train mode, for TTS model, fast means model instantly available after creation", + "title": "Train Mode", + "type": "string" + }, + "voices": { "anyOf": [ { - "format": "binary", - "type": "string" + "items": { + "format": "binary", + "type": "string" + }, + "maxItems": 20, + "minItems": 1, + "type": "array" }, { - "type": "null" + "format": "binary", + "type": "string" } ], - "default": null, - "title": "Cover Image" + "description": "Upload voices files that will be used to tune the model", + "title": "Voices" }, - "visibility": { + "texts": { "anyOf": [ { - "enum": [ - "public", - "unlist", - "private" - ], + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + { "type": "string" }, { @@ -12699,7 +12073,8 @@ } ], "default": null, - "title": "Visibility" + "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", + "title": "Texts" }, "tags": { "anyOf": [ @@ -12711,18 +12086,62 @@ }, { "type": "string" + }, + { + "type": "null" } ], + "description": "Model tags", "title": "Tags" + }, + "enhance_audio_quality": { + "default": true, + "description": "Enhance audio quality", + "title": "Enhance Audio Quality", + "type": "boolean" + }, + "generate_sample": { + "default": false, + "description": "Generate default text", + "title": "Generate Sample", + "type": "boolean" } }, + "required": [ + "type", + "title", + "train_mode", + "voices" + ], "type": "object" } }, - "multipart/form-data": { + "application/msgpack": { "schema": { "properties": { + "visibility": { + "default": "public", + "description": "Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator", + "enum": [ + "public", + "unlist", + "private" + ], + "title": "Visibility", + "type": "string" + }, + "type": { + "const": "tts", + "description": "Model type, tts is for text to speech", + "title": "Type", + "type": "string" + }, "title": { + "description": "Model title or name", + "title": "Title", + "type": "string" + }, + "description": { "anyOf": [ { "type": "string" @@ -12732,11 +12151,13 @@ } ], "default": null, - "title": "Title" + "description": "Model description", + "title": "Description" }, - "description": { + "cover_image": { "anyOf": [ { + "format": "binary", "type": "string" }, { @@ -12744,29 +12165,44 @@ } ], "default": null, - "title": "Description" + "description": "Model cover image, this is required if the model is public", + "title": "Cover Image" }, - "cover_image": { + "train_mode": { + "const": "fast", + "description": "Model train mode, for TTS model, fast means model instantly available after creation", + "title": "Train Mode", + "type": "string" + }, + "voices": { "anyOf": [ { - "format": "binary", - "type": "string" + "items": { + "format": "binary", + "type": "string" + }, + "maxItems": 20, + "minItems": 1, + "type": "array" }, { - "type": "null" + "format": "binary", + "type": "string" } ], - "default": null, - "title": "Cover Image" + "description": "Upload voices files that will be used to tune the model", + "title": "Voices" }, - "visibility": { + "texts": { "anyOf": [ { - "enum": [ - "public", - "unlist", - "private" - ], + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + { "type": "string" }, { @@ -12774,7 +12210,8 @@ } ], "default": null, - "title": "Visibility" + "description": "Texts corresponding to the voices, if unspecified, ASR will be performed on the voices", + "title": "Texts" }, "tags": { "anyOf": [ @@ -12786,95 +12223,299 @@ }, { "type": "string" + }, + { + "type": "null" } ], + "description": "Model tags", "title": "Tags" + }, + "enhance_audio_quality": { + "default": true, + "description": "Enhance audio quality", + "title": "Enhance Audio Quality", + "type": "boolean" + }, + "generate_sample": { + "default": false, + "description": "Generate default text", + "title": "Generate Sample", + "type": "boolean" } }, + "required": [ + "type", + "title", + "train_mode", + "voices" + ], "type": "object" } - }, - "application/msgpack": { - "schema": { - "properties": { - "title": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Title" - }, - "description": { - "anyOf": [ - { + } + } + }, + "responses": { + "201": { + "description": "Document created, URL follows", + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "_id": { + "title": "Id", + "type": "string" + }, + "type": { + "enum": [ + "svc", + "tts" + ], + "title": "Type", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + }, + "description": { + "default": "", + "title": "Description", + "type": "string" + }, + "cover_image": { + "default": "", + "title": "Cover Image", + "type": "string" + }, + "train_mode": { + "default": "full", + "enum": [ + "fast", + "full" + ], + "title": "Train Mode", + "type": "string" + }, + "state": { + "enum": [ + "created", + "training", + "trained", + "failed" + ], + "title": "State", + "type": "string" + }, + "tags": { + "items": { "type": "string" }, - { - "type": "null" - } - ], - "default": null, - "title": "Description" - }, - "cover_image": { - "anyOf": [ - { - "format": "binary", - "type": "string" + "title": "Tags", + "type": "array" + }, + "samples": { + "default": [], + "items": { + "$ref": "#/components/schemas/SampleEntity" }, - { - "type": "null" - } - ], - "default": null, - "title": "Cover Image" - }, - "visibility": { - "anyOf": [ - { - "enum": [ - "public", - "unlist", - "private" - ], + "title": "Samples", + "type": "array" + }, + "created_at": { + "format": "date-time", + "title": "Created At", + "type": "string" + }, + "updated_at": { + "format": "date-time", + "title": "Updated At", + "type": "string" + }, + "languages": { + "default": [], + "items": { "type": "string" }, - { - "type": "null" - } - ], - "default": null, - "title": "Visibility" - }, - "tags": { - "anyOf": [ - { - "items": { + "title": "Languages", + "type": "array" + }, + "visibility": { + "enum": [ + "public", + "unlist", + "private" + ], + "title": "Visibility", + "type": "string" + }, + "lock_visibility": { + "default": false, + "title": "Lock Visibility", + "type": "boolean" + }, + "dmca_taken_down": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Dmca Taken Down" + }, + "default_text": { + "default": "", + "title": "Default Text", + "type": "string" + }, + "source": { + "anyOf": [ + { "type": "string" }, - "type": "array" - }, - { - "type": "string" - } - ], - "title": "Tags" - } - }, - "type": "object" + { + "type": "null" + } + ], + "default": null, + "title": "Source" + }, + "pvc_release_state": { + "anyOf": [ + { + "enum": [ + "released", + "retiring" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Release State" + }, + "pvc_notice_period_months": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Notice Period Months" + }, + "pvc_released_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Released At" + }, + "pvc_retire_requested_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Retire Requested At" + }, + "pvc_retire_effective_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Retire Effective At" + }, + "quality": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelQualityEntity" + }, + { + "type": "null" + } + ], + "default": null + }, + "like_count": { + "title": "Like Count", + "type": "integer" + }, + "mark_count": { + "title": "Mark Count", + "type": "integer" + }, + "shared_count": { + "title": "Shared Count", + "type": "integer" + }, + "task_count": { + "title": "Task Count", + "type": "integer" + }, + "unliked": { + "default": false, + "title": "Unliked", + "type": "boolean" + }, + "liked": { + "default": false, + "title": "Liked", + "type": "boolean" + }, + "marked": { + "default": false, + "title": "Marked", + "type": "boolean" + }, + "author": { + "$ref": "#/components/schemas/AuthorEntity" + } + }, + "required": [ + "_id", + "type", + "title", + "state", + "tags", + "created_at", + "updated_at", + "visibility", + "like_count", + "mark_count", + "shared_count", + "task_count", + "author" + ], + "type": "object" + } } } - } - }, - "responses": { - "200": { - "description": "Request fulfilled, document follows", - "headers": {} }, "401": { "description": "No permission -- see authorization schemes", @@ -12954,9 +12595,11 @@ "tags": [ "Model" ] - }, - "delete": { - "summary": "Delete Model", + } + }, + "/model/{id}": { + "get": { + "summary": "Get Model", "security": [ { "BearerAuth": [] @@ -12978,10 +12621,267 @@ "responses": { "200": { "description": "Request fulfilled, document follows", - "headers": {} + "headers": {}, + "content": { + "application/json": { + "schema": { + "properties": { + "_id": { + "title": "Id", + "type": "string" + }, + "type": { + "enum": [ + "svc", + "tts" + ], + "title": "Type", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + }, + "description": { + "default": "", + "title": "Description", + "type": "string" + }, + "cover_image": { + "default": "", + "title": "Cover Image", + "type": "string" + }, + "train_mode": { + "default": "full", + "enum": [ + "fast", + "full" + ], + "title": "Train Mode", + "type": "string" + }, + "state": { + "enum": [ + "created", + "training", + "trained", + "failed" + ], + "title": "State", + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "title": "Tags", + "type": "array" + }, + "samples": { + "default": [], + "items": { + "$ref": "#/components/schemas/SampleEntity" + }, + "title": "Samples", + "type": "array" + }, + "created_at": { + "format": "date-time", + "title": "Created At", + "type": "string" + }, + "updated_at": { + "format": "date-time", + "title": "Updated At", + "type": "string" + }, + "languages": { + "default": [], + "items": { + "type": "string" + }, + "title": "Languages", + "type": "array" + }, + "visibility": { + "enum": [ + "public", + "unlist", + "private" + ], + "title": "Visibility", + "type": "string" + }, + "lock_visibility": { + "default": false, + "title": "Lock Visibility", + "type": "boolean" + }, + "dmca_taken_down": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "title": "Dmca Taken Down" + }, + "default_text": { + "default": "", + "title": "Default Text", + "type": "string" + }, + "source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Source" + }, + "pvc_release_state": { + "anyOf": [ + { + "enum": [ + "released", + "retiring" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Release State" + }, + "pvc_notice_period_months": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Notice Period Months" + }, + "pvc_released_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Released At" + }, + "pvc_retire_requested_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Retire Requested At" + }, + "pvc_retire_effective_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Pvc Retire Effective At" + }, + "quality": { + "anyOf": [ + { + "$ref": "#/components/schemas/ModelQualityEntity" + }, + { + "type": "null" + } + ], + "default": null + }, + "like_count": { + "title": "Like Count", + "type": "integer" + }, + "mark_count": { + "title": "Mark Count", + "type": "integer" + }, + "shared_count": { + "title": "Shared Count", + "type": "integer" + }, + "task_count": { + "title": "Task Count", + "type": "integer" + }, + "unliked": { + "default": false, + "title": "Unliked", + "type": "boolean" + }, + "liked": { + "default": false, + "title": "Liked", + "type": "boolean" + }, + "marked": { + "default": false, + "title": "Marked", + "type": "boolean" + }, + "author": { + "$ref": "#/components/schemas/AuthorEntity" + } + }, + "required": [ + "_id", + "type", + "title", + "state", + "tags", + "created_at", + "updated_at", + "visibility", + "like_count", + "mark_count", + "shared_count", + "task_count", + "author" + ], + "type": "object" + } + } + } }, - "401": { - "description": "No permission -- see authorization schemes", + "403": { + "description": "Request forbidden -- authorization will not help", "headers": {}, "content": { "application/json": { @@ -13017,8 +12917,8 @@ } } }, - "503": { - "description": "The server cannot process the request due to a high load", + "404": { + "description": "Nothing matches the given URI", "headers": {}, "content": { "application/json": { @@ -13058,12 +12958,9 @@ "tags": [ "Model" ] - } - }, - "/v1/agent/phone-calls": { - "post": { - "summary": "Create Phone Call", - "description": "Place an outbound call from one of your Twilio phone numbers to a US,\nCanada or Japan destination. A domestic trunk 0 after +81 (e.g.\n+81080...) is accepted and normalized to E.164 (+8180...). Returns\nimmediately with the session queued for\ndialing; subscribe to the `phone_call.dial_finished` webhook or poll\n`GET /v1/agent/sessions/{session_id}` for the dial outcome. Ringing is\nnever billed \u2014 metering starts when the callee answers.\n\nErrors carry a machine-readable `reason` (e.g. `destination_not_allowed`,\n`insufficient_credit`, `daily_limit_exceeded`,\n`concurrency_limit_exceeded`).", + }, + "patch": { + "summary": "Update Model", "security": [ { "BearerAuth": [] @@ -13071,21 +12968,13 @@ ], "parameters": [ { - "in": "header", - "name": "idempotency-key", - "description": "Retry-safe replay key: the same key with the same body returns the call already placed instead of dialing again (24h window).", - "required": false, + "in": "path", + "name": "id", + "description": "", + "required": true, "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Idempotency-Key" + "title": "Id", + "type": "string" }, "deprecated": false } @@ -13095,225 +12984,313 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PhoneCallCreatePayload" - } - } - } - }, - "responses": { - "201": { - "description": "Document created, URL follows", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "session_id": { - "title": "Session Id", - "type": "string" - }, - "status": { - "const": "queued", - "default": "queued", - "title": "Status", - "type": "string" - } + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" }, - "required": [ - "session_id" - ], - "type": "object" - } - } - } - }, - "401": { - "description": "No permission -- see authorization schemes", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Description" }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - }, - "402": { - "description": "No payment -- see charging schemes", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { + "cover_image": { + "anyOf": [ + { + "format": "binary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Cover Image" + }, + "visibility": { + "anyOf": [ + { + "enum": [ + "public", + "unlist", + "private" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Visibility" + }, + "tags": { + "anyOf": [ + { + "items": { "type": "string" }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } + "type": "array" + }, + { + "type": "string" + } + ], + "title": "Tags" + } + }, + "type": "object" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Description" + }, + "cover_image": { + "anyOf": [ + { + "format": "binary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Cover Image" }, - "required": [ - "status", - "message" - ], - "type": "object" - } - } - } - }, - "403": { - "description": "Request forbidden -- authorization will not help", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { + "visibility": { + "anyOf": [ + { + "enum": [ + "public", + "unlist", + "private" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Visibility" + }, + "tags": { + "anyOf": [ + { + "items": { "type": "string" }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } + "type": "array" + }, + { + "type": "string" + } + ], + "title": "Tags" + } + }, + "type": "object" } - } - }, - "404": { - "description": "Nothing matches the given URI", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { + }, + "multipart/form-data": { + "schema": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Description" + }, + "cover_image": { + "anyOf": [ + { + "format": "binary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Cover Image" + }, + "visibility": { + "anyOf": [ + { + "enum": [ + "public", + "unlist", + "private" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Visibility" + }, + "tags": { + "anyOf": [ + { + "items": { "type": "string" }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } + "type": "array" + }, + { + "type": "string" + } + ], + "title": "Tags" + } + }, + "type": "object" } - } - }, - "409": { - "description": "Request conflict", - "headers": {}, - "content": { - "application/json": { - "schema": { - "properties": { - "status": { - "title": "Status", - "type": "integer" - }, - "message": { - "title": "Message", - "type": "string" - }, - "reason": { - "anyOf": [ - { + }, + "application/msgpack": { + "schema": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Description" + }, + "cover_image": { + "anyOf": [ + { + "format": "binary", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Cover Image" + }, + "visibility": { + "anyOf": [ + { + "enum": [ + "public", + "unlist", + "private" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Visibility" + }, + "tags": { + "anyOf": [ + { + "items": { "type": "string" }, - { - "type": "null" - } - ], - "default": null, - "title": "Reason" - } - }, - "required": [ - "status", - "message" - ], - "type": "object" - } + "type": "array" + }, + { + "type": "string" + } + ], + "title": "Tags" + } + }, + "type": "object" } } + } + }, + "responses": { + "200": { + "description": "Request fulfilled, document follows", + "headers": {} }, - "422": { - "description": "", + "401": { + "description": "No permission -- see authorization schemes", "headers": {}, "content": { "application/json": { @@ -13349,8 +13326,8 @@ } } }, - "429": { - "description": "The user has sent too many requests in a given amount of time (\"rate limiting\")", + "503": { + "description": "The server cannot process the request due to a high load", "headers": {}, "content": { "application/json": { @@ -13385,9 +13362,39 @@ } } } + } + }, + "tags": [ + "Model" + ] + }, + "delete": { + "summary": "Delete Model", + "security": [ + { + "BearerAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "", + "required": true, + "schema": { + "title": "Id", + "type": "string" + }, + "deprecated": false + } + ], + "responses": { + "200": { + "description": "Request fulfilled, document follows", + "headers": {} }, - "502": { - "description": "Invalid responses from another server/proxy", + "401": { + "description": "No permission -- see authorization schemes", "headers": {}, "content": { "application/json": { @@ -13462,14 +13469,7 @@ } }, "tags": [ - "Phone Calls" - ], - "x-codeSamples": [ - { - "lang": "bash", - "label": "Create Phone Call", - "source": "curl --request POST \\\n --url https://api.fish.audio/v1/agent/phone-calls \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --header 'Idempotency-Key: ' \\\n --data '{\n \"agent_id\": \"\",\n \"phone_number_id\": \"\",\n \"to_number\": \"+14155550123\"\n }'" - } + "Model" ] } } @@ -13484,7 +13484,7 @@ }, "schemas": { "AgentSessionSummary": { - "description": "One list row: lifecycle facts only \u2014 the conversation timeline lives on\nthe detail endpoint (Retell-style thin list).", + "description": "One list row: lifecycle facts only — the conversation timeline lives on\nthe detail endpoint (Retell-style thin list).", "properties": { "session_id": { "title": "Session Id", @@ -15865,7 +15865,7 @@ "type": "string" }, "first_message": { - "default": "Hi! Thanks for calling \u2014 how can I help you today?", + "default": "Hi! Thanks for calling — how can I help you today?", "title": "First Message", "type": "string" }, @@ -16917,6 +16917,88 @@ "title": "PublicPhoneNumberUpdatePayload", "type": "object" }, + "PhoneCallCreatePayload": { + "additionalProperties": false, + "description": "POST phone-calls body, shared by the public and console routes.\n\nto_number is deliberately not format-validated here: the contract orders\nthe E.164 check after the agent/published checks, so it runs in the\nservice with a machine-readable reason.", + "properties": { + "agent_id": { + "title": "Agent Id", + "type": "string" + }, + "phone_number_id": { + "description": "The team-owned number to dial from (twilio provider only).", + "title": "Phone Number Id", + "type": "string" + }, + "to_number": { + "description": "Destination in E.164, e.g. +14155550123.", + "title": "To Number", + "type": "string" + }, + "dynamic_variables": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "maxProperties": 50, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Dynamic Variables" + }, + "overrides": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentSessionOverridesPayload" + }, + { + "type": "null" + } + ], + "default": null + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Metadata" + } + }, + "required": [ + "agent_id", + "phone_number_id", + "to_number" + ], + "title": "PhoneCallCreatePayload", + "type": "object" + }, "ASRSegment": { "properties": { "text": { @@ -16988,7 +17070,7 @@ "type": "object" }, "TTSRequest": { - "description": "Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is only available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`), not `s1`.\n\n## Single Speaker\nProvide either `reference_id` (string) pointing to a voice model, or `references` (array of ReferenceAudio) for zero-shot cloning.\n\n## Multiple Speakers (Dialogue \u2014 S2 family only)\nFor multi-speaker synthesis, provide:\n- `reference_id`: array of voice model IDs, e.g., [\"speaker-0-id\", \"speaker-1-id\"]\n- `text`: use speaker tags `<|speaker:0|>`, `<|speaker:1|>`, etc. to indicate speaker changes, e.g., \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\"\n\nAlternatively, for zero-shot multi-speaker:\n- `references`: 2D array where each inner array contains references for one speaker\n- `reference_id`: array of identifiers (can be arbitrary strings for zero-shot)\n\n## Example (Multi-Speaker with Model IDs)\n```json\n{\n \"text\": \"<|speaker:0|>Good morning!<|speaker:1|>Good morning! How are you?<|speaker:0|>I'm great, thanks!\",\n \"reference_id\": [\"model-id-alice\", \"model-id-bob\"]\n}\n```", + "description": "Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is only available with the S2 family (`s2-pro`, `s2.1-pro`, `s2.1-pro-free`), not `s1`.\n\n## Single Speaker\nProvide either `reference_id` (string) pointing to a voice model, or `references` (array of ReferenceAudio) for zero-shot cloning.\n\n## Multiple Speakers (Dialogue — S2 family only)\nFor multi-speaker synthesis, provide:\n- `reference_id`: array of voice model IDs, e.g., [\"speaker-0-id\", \"speaker-1-id\"]\n- `text`: use speaker tags `<|speaker:0|>`, `<|speaker:1|>`, etc. to indicate speaker changes, e.g., \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\"\n\nAlternatively, for zero-shot multi-speaker:\n- `references`: 2D array where each inner array contains references for one speaker\n- `reference_id`: array of identifiers (can be arbitrary strings for zero-shot)\n\n## Example (Multi-Speaker with Model IDs)\n```json\n{\n \"text\": \"<|speaker:0|>Good morning!<|speaker:1|>Good morning! How are you?<|speaker:0|>I'm great, thanks!\",\n \"reference_id\": [\"model-id-alice\", \"model-id-bob\"]\n}\n```", "properties": { "text": { "description": "Text to convert to speech.", @@ -18010,88 +18092,6 @@ ], "title": "SampleEntity", "type": "object" - }, - "PhoneCallCreatePayload": { - "additionalProperties": false, - "description": "POST phone-calls body, shared by the public and console routes.\n\nto_number is deliberately not format-validated here: the contract orders\nthe E.164 check after the agent/published checks, so it runs in the\nservice with a machine-readable reason.", - "properties": { - "agent_id": { - "title": "Agent Id", - "type": "string" - }, - "phone_number_id": { - "description": "The team-owned number to dial from (twilio provider only).", - "title": "Phone Number Id", - "type": "string" - }, - "to_number": { - "description": "Destination in E.164, e.g. +14155550123.", - "title": "To Number", - "type": "string" - }, - "dynamic_variables": { - "anyOf": [ - { - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "maxProperties": 50, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Dynamic Variables" - }, - "overrides": { - "anyOf": [ - { - "$ref": "#/components/schemas/AgentSessionOverridesPayload" - }, - { - "type": "null" - } - ], - "default": null - }, - "metadata": { - "anyOf": [ - { - "additionalProperties": { - "$ref": "#/components/schemas/JsonValue" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Metadata" - } - }, - "required": [ - "agent_id", - "phone_number_id", - "to_number" - ], - "title": "PhoneCallCreatePayload", - "type": "object" } } },