Platform notice: all DeepSeek models are now live. New users receive trial credits on sign-up.
Api reference

Audio Transcriptions

An OpenAI-compatible speech-to-text endpoint; upload audio via multipart and pay by duration.

Request

POST /api/gateway/v1/audio/transcriptions
  • Authentication: request header Authorization: Bearer sk-tp-... (create an API Key in the Console)
  • Content-Type: multipart/form-data

Request body

ParameterTypeRequiredDescription
filefileYesAudio file, 25MB max; returns 413 if exceeded
modelstringYesPlatform transcription model name; see Model list
Other parameters-Nolanguage, prompt, temperature, and others are passed through per the OpenAI protocol

The platform always requests the upstream with response_format=verbose_json (duration billing depends on it, so any value the caller passes for this parameter is overridden). The response additionally includes duration (audio length in seconds).

Response

Returns transcription JSON (text is the transcript; duration is the audio length in seconds). The response headers carry billing information for this call:

HeaderDescription
X-Cost-YuanCost of this call (yuan, 6 decimal places)
X-Bill-UnitsBilled seconds for this call

Billing

  • Transcription models are priced in "yuan per minute" and converted to seconds based on the actual audio duration: cost = unit price × seconds ÷ 60.
  • If the upstream response lacks duration, the platform rejects the request (returns 400, no charge), consistent with "no usage, no settlement".

Pre-checks

Before the call, the platform validates in order; if any step fails, an error is returned:

  1. Key valid and not revoked (including all parents), account status normal → otherwise 401
  2. file uploaded, model exists and is available (LIVE), is duration-billed with a unit price configured → otherwise 400
  3. File no larger than 25MB → otherwise 413
  4. Account balance greater than 0, key chain quota not exhausted → otherwise 402
  5. Upstream returned the audio duration → otherwise 400 (no charge)

Errors

For the error response body format and troubleshooting, see FAQ · Error codes. Errors returned by the upstream model service are passed through verbatim (status code and response body unchanged).

On this page