Skip to main content
POST
Pass-through to the provider’s audio endpoint (speech, transcription, translation). Request and response bodies follow the standard OpenAI Audio API schema. The provider is inferred from the model name (e.g. tts-1, whisper-1 route to OpenAI).
Audio requests pass through to your provider and work today. They are not yet counted toward your cost totals. Full cost tracking for audio is coming soon.
Audio supports both JSON (application/json) and multipart/form-data bodies. Use JSON for text-to-speech (TTS) requests and multipart/form-data for transcription and translation (Whisper) requests, following the standard OpenAI Audio API schema.

Headers

X-Toolken-Key
string
required
Your Toolken API key. Validated by the gateway and stripped before forwarding.
Authorization
string
required
Your provider key in Bearer format (BYOK), e.g. Bearer sk-.... Forwarded untouched, never stored.
X-Toolken-Metadata
string
Primary attribution channel. JSON object of key-value pairs (e.g. {"agent":"research-agent","customer_id":"cust_abc"}). Each key becomes a groupable dimension in the dashboard.
X-Toolken-Metadata-*
string
Flat-header shorthand. X-Toolken-Metadata-Agent: research-agent writes metadata key agent. Equivalent to sending the same key in X-Toolken-Metadata.
X-Toolken-Metadata-Feature
string
Sets the feature metadata key. Use to group costs by agent name, workflow, UI surface, or job type.
X-Toolken-Metadata-Customer-Id
string
Sets the customer_id metadata key. Use to attribute costs to an end-customer, org slug, or account ID.

Body

model
string
required
Audio model identifier (e.g. tts-1 for speech, whisper-1 for transcription/translation).
Additional fields follow the standard OpenAI Audio API schema. For speech, include input (text to synthesize) and voice. For transcription and translation, send multipart/form-data with a file field.

Response

Speech requests return audio bytes (audio/mpeg). Transcription and translation requests return a JSON object with a text field. The response is forwarded verbatim from the provider.