Skip to main content
HTTP + SSE based speech recognition: submit the audio once, and the server continuously pushes incremental and final transcription results over SSE. Suitable for server-side calls, file transcription, and near-real-time processing. Recommended model: stepaudio-2.5-asr.
For WebSocket-based real-time bidirectional streaming recognition, see Streaming Speech Recognition (Bidirectional Streaming).

Endpoint

POST https://api.stepfun.ai/v1/audio/asr/sse
For Step Plan, use POST https://api.stepfun.ai/step_plan/v1/audio/asr/sse.

Request Headers

  • Content-Type string required
    Must be application/json.
  • Accept string required
    Must be text/event-stream.
  • Authorization string required
    Authentication token in the format Bearer $STEPFUN_API_KEY.

Request Parameters

  • audio object required
    Audio data and recognition configuration.

Request Example

Compatibility note: The SSE endpoint no longer supports the full_rerun_on_commit (second-pass correction) parameter. If legacy clients still send it, the server ignores it without affecting the recognition result. For second-pass correction, use the WebSocket endpoint (see Streaming Speech Recognition (Bidirectional Streaming)).
Additional notes:
  • Audio data must be Base64-encoded.
  • Supported audio formats: ogg, mp3, wav, pcm, m4a.
  • When the audio format is pcm, rate, bits, and channel are required; for ogg, mp3, wav, and m4a they are optional.

Response

SSE streaming response with the following event types.

Delta event (transcript.text.delta)

Incremental transcription text.
  • type string
    Event type. Fixed as transcript.text.delta.
  • meta.session_id string
    Session ID.
  • meta.timestamp int64
    Server-side event Unix timestamp, in milliseconds.
  • delta string
    Incremental transcription text.

Done event (transcript.text.done)

The complete transcription text has been generated.
  • type string
    Event type. Fixed as transcript.text.done.
  • meta.session_id string
    Session ID.
  • meta.timestamp int64
    Unix timestamp, in milliseconds.
  • text string
    The complete transcription text.
  • usage object
    Usage statistics.

Error event (error)

Returned when recognition fails.
  • type string
    Event type. Fixed as error.
  • meta.session_id string
    Session ID.
  • meta.timestamp int64
    Unix timestamp, in milliseconds.
  • message string
    Error description.
For the full list of error codes, see Error Codes.