NativePort Fish Audio API
The fishAudio API from NativePort — 4 operation(s) for fishaudio.
Operations 4
POST
/fishaudio/v1/tts/stream/with-timestamp
Synthesize speech with word-level timestamps (streaming)
#
The fishAudio API from NativePort — 4 operation(s) for fishaudio.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/nativeport-ai:nativeport-ai-fishaudio-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Reference Fish Audio API
version: 1.0.0
servers:
- url: https://api.nativeport.ai
description: NativePort production
- url: http://localhost:8787
description: Local development (wrangler dev)
tags:
- name: fishAudio
paths:
/fishaudio/v1/tts:
post:
operationId: fishAudio_fishaudioTts
summary: Synthesize speech (Text to Speech)
description: 'Relays to `https://api.fish.audio/v1/tts`, overwriting `Authorization` with the gateway''s
Fish Audio key. `text` is the only required body field; `reference_id` selects a voice,
`references` (`application/msgpack` bodies only) supplies inline audio for zero-shot cloning,
and `format` (`mp3` default, `wav`, `pcm`, `opus`) plus `sample_rate`/`prosody`/`latency`
control the output. Billed on the real UTF-8 byte count of `text` at $15.825/1M bytes, fee
included.'
tags:
- fishAudio
parameters:
- name: model
in: header
description: Which Fish Audio TTS model to use.
required: true
schema:
$ref: '#/components/schemas/FishaudioV1TtsPostParametersModel'
responses:
'200':
description: 'Chunked binary audio (`Transfer-Encoding: chunked`) in the requested `format` —
`audio/mpeg` for `mp3`, raw bytes for `wav`/`pcm`/`opus`. Relayed byte-for-byte.
'
content:
application/octet-stream:
schema:
type: string
format: binary
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
content:
application/json:
schema:
type: object
additionalProperties:
description: Any type
security:
- bearerAuth: []
/fishaudio/v1/tts/stream/with-timestamp:
post:
operationId: fishAudio_fishaudioTtsStreamWithTimestamp
summary: Synthesize speech with word-level timestamps (streaming)
description: 'Same request shape and `model` header as `/fishaudio/v1/tts`, relayed to
`https://api.fish.audio/v1/tts/stream/with-timestamp`, but answers as Server-Sent Events
instead of a flat binary stream. Billed identically to `/fishaudio/v1/tts`.'
tags:
- fishAudio
parameters:
- name: model
in: header
description: Which Fish Audio TTS model to use.
required: true
schema:
$ref: '#/components/schemas/FishaudioV1TtsStreamWithTimestampPostParametersModel'
responses:
'200':
description: 'A Server-Sent Events stream. Each `message` event is one JSON payload: `audio_base64`
(concatenate every chunk, in arrival order, to reconstruct the full audio), `content`, a
cumulative `alignment` snapshot (`{audio_duration, segments: [{text, start, end}]}`) keyed
by `chunk_seq` — replace the stored snapshot for that `chunk_seq` on each new event,
never append — and `chunk_audio_offset_sec`.
'
content:
text/event-stream:
schema:
type: string
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
content:
application/json:
schema:
type: object
additionalProperties:
description: Any type
security:
- bearerAuth: []
/fishaudio/v1/asr:
post:
operationId: fishAudio_fishaudioAsr
summary: Transcribe audio (Speech to Text)
description: 'Relays to `https://api.fish.audio/v1/asr`, overwriting `Authorization` with the gateway''s
Fish Audio key. No `model` header — Fish Audio''s ASR is a single model. Billed on the
response''s real `duration`, rounded up to the nearest second, at $0.3798/audio hour, fee
included.'
tags:
- fishAudio
responses:
'200':
description: The transcription, relayed untouched.
content:
application/json:
schema:
$ref: '#/components/schemas/Fish_Audio_fishaudioAsr_Response_200'
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
audio:
type: string
description: Audio to transcribe, base64-encoded.
language:
type:
- string
- 'null'
description: Optional language hint.
ignore_timestamps:
type: boolean
default: true
description: 'Set false for per-segment timing on audio under 30 seconds, at higher latency.
'
required:
- audio
security:
- bearerAuth: []
/fishaudio/v1/voice-design:
post:
operationId: fishAudio_fishaudioVoiceDesign
summary: Generate synthetic voice candidates (Voice Design)
description: 'Relays to `https://api.fish.audio/v1/voice-design`, overwriting `Authorization` with the
gateway''s Fish Audio key. Billed a flat $0.01055 per successful request (Fish Audio''s own
rate plus the gateway''s 5.5% fee); validation, balance, concurrency, and service errors are
not billed. Candidates are one-off generations, not persisted voices — turning one into a
reusable model would need `/model`, which this gateway does not mount.'
tags:
- fishAudio
parameters:
- name: model
in: header
description: Voice-design model to use — currently only one value.
required: true
schema:
$ref: '#/components/schemas/FishaudioV1VoiceDesignPostParametersModel'
responses:
'200':
description: The generated candidates, relayed untouched.
content:
application/json:
schema:
$ref: '#/components/schemas/Fish_Audio_fishaudioVoiceDesign_Response_200'
'401':
description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: 'No route matched the path, or the matched route disallows that method (an unlisted
`/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the
gateway sends it. A path on one of the four model-inference routes also `404`s this way when
the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model
addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
instruction:
type: string
minLength: 1
maxLength: 2000
description: Voice design prompt.
reference_text:
type:
- string
- 'null'
maxLength: 150
language:
type:
- string
- 'null'
description: Optional BCP-47 language hint.
n:
type: integer
minimum: 1
maximum: 4
default: 2
description: Number of voice candidates to generate.
speed:
type: number
format: double
default: 1
num_step:
type: integer
default: 32
guidance_scale:
type: number
format: double
default: 2
instruct_guidance_scale:
type: number
format: double
default: 0
seed:
type:
- integer
- 'null'
required:
- instruction
security:
- bearerAuth: []
components:
schemas:
FishaudioV1VoiceDesignPostParametersModel:
type: string
enum:
- voice-design-1
default: voice-design-1
title: FishaudioV1VoiceDesignPostParametersModel
FishaudioV1AsrPostResponsesContentApplicationJsonSchemaSegmentsItems:
type: object
properties:
text:
type: string
start:
type: number
format: double
end:
type: number
format: double
title: FishaudioV1AsrPostResponsesContentApplicationJsonSchemaSegmentsItems
FishaudioV1TtsStreamWithTimestampPostParametersModel:
type: string
enum:
- s1
- s2-pro
- s2.1-pro
default: s2.1-pro
title: FishaudioV1TtsStreamWithTimestampPostParametersModel
Fish_Audio_fishaudioAsr_Response_200:
type: object
properties:
text:
type: string
duration:
type: number
format: double
description: Duration of the audio in seconds — the figure the gateway bills from.
segments:
type: array
items:
$ref: '#/components/schemas/FishaudioV1AsrPostResponsesContentApplicationJsonSchemaSegmentsItems'
required:
- text
- duration
- segments
title: Fish Audio_fishaudioAsr_Response_200
Error:
type: object
properties:
error:
type: string
description: Explanatory message meant for humans.
required:
- error
title: Error
FishaudioV1VoiceDesignPostResponsesContentApplicationJsonSchemaCandidatesItems:
type: object
properties:
id:
type: string
index:
type: integer
audio_base64:
type: string
sample_rate:
type: integer
duration_ms:
type: integer
text:
type:
- string
- 'null'
instruct:
type:
- string
- 'null'
language:
type:
- string
- 'null'
required:
- id
- index
- audio_base64
- sample_rate
- duration_ms
title: FishaudioV1VoiceDesignPostResponsesContentApplicationJsonSchemaCandidatesItems
FishaudioV1TtsPostParametersModel:
type: string
enum:
- s1
- s2-pro
- s2.1-pro
default: s2.1-pro
title: FishaudioV1TtsPostParametersModel
Fish_Audio_fishaudioVoiceDesign_Response_200:
type: object
properties:
candidates:
type: array
items:
$ref: '#/components/schemas/FishaudioV1VoiceDesignPostResponsesContentApplicationJsonSchemaCandidatesItems'
required:
- candidates
title: Fish Audio_fishaudioVoiceDesign_Response_200
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Your per-client bearer token — the API key the gateway issued to you. Present it in
`Authorization: Bearer <token>` form. A token that is missing, unknown, or revoked draws a
`401`. Before the call is sent upstream the token is removed (stripped, or swapped for the
upstream''s own credential); it never makes it past the gateway.
'