traceparent
header. Send this header when your application already has an active trace and
you want Fish Audio edge, inference, alignment, and upstream ASR spans to appear
under the same trace ID.
Supported inference surfaces:
POST /v1/ttsPOST /v1/tts/stream/with-timestampPOST /v1/asrwss://api.fish.audio/v1/tts/live
traceparent is omitted or invalid, Fish Audio starts a new trace for the
request. Tracing does not change authentication, rate limits, billing, request
priority, or generated output.
Header Format
Use the W3Ctraceparent format:
4bf92f3577b34da6a3ce929d0e0e4736 is the trace ID. Fish Audio
continues that trace ID when it calls the inference backend and related services.
Bind Business and Inference Traces
To bind your business-side trace to Fish Audio’s inference-side trace:- Start or continue a trace in your application for the user workflow.
- Create a child span around the Fish Audio request.
- Inject that span context into the request headers.
- Send the request with
traceparent. - Use the same trace ID in your observability tool to inspect both your business spans and Fish Audio inference spans.
REST Example
OpenTelemetry Examples
- Python
- Node.js
WebSocket Tracing
Passtraceparent on the WebSocket upgrade request:
Browser WebSocket APIs do not allow custom headers. For browser clients,
inject
traceparent from a trusted server-side proxy or use REST endpoints
where your frontend can send the header through fetch.Enterprise Performance Analysis
Fish Audio supports trace-based performance analysis for enterprise customers
with a signed enterprise agreement. When this support is enabled, share the
W3C trace ID with Fish Audio support so we can correlate your business span
with Fish Audio edge routing, backend inference, reference-audio encoding,
TTFT, response-time, alignment, and upstream ASR spans.
traceparent value needed for investigation. Do not
place API keys, user identifiers, transcripts, audio URLs, or other sensitive
data in trace IDs or span names.
