Skip to main content
POST
/
audio
/
transcriptions
语音转文字接口
curl --request POST \
  --url https://geekai.co/api/v1/audio/transcriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form model=whisper-1 \
  --form file='@example-file' \
  --form 'prompt=<string>' \
  --form 'language=<string>' \
  --form response_format=text \
  --form stream=true \
  --form temperature=0 \
  --form retries=0
"<string>"
Note: For speech model name settings, refer to the System Supported Transcription Speech Model List. The request/response parameter structure is fully compatible with OpenAI. When switching models, you only need to modify the corresponding model name. If the model request/response parameters are inconsistent with OpenAI, GeekAI will automatically convert and align them at the backend.
The response data format is fully compatible with the OpenAI speech transcription text interface.

cURL Request Example

curl --location 'https://geekai.dev/api/v1/audio/transcriptions' \
    --header 'Authorization: {YOUR_GEEKAI_API_KEY}' \
    --form 'file=@"/C:/User/GeekAI/Downloads/2cd359fe642c33deaa943f7306d73f30.mp3"' \
    --form 'model="whisper-1"' \
    --form 'response_format="text"'

Authorizations

Authorization
string
header
required

API认证token

Body

multipart/form-data
model
string
default:whisper-1
required

语音识别模型

file
file
required

音频文件

prompt
string

提示文本,用于指导转录风格

language
string

音频语言

response_format
enum<string>
default:text

响应格式,

Available options:
text,
srt,
vtt,
json
stream
boolean
default:false

是否返回流式响应,默认false,whisper-1 模型不支持该设置

Example:

true

temperature
number
default:0

采样温度,控制输出的随机性

retries
integer
default:0

自动重试次数,默认0,表示失败不重试

Response

成功响应

纯文本格式的转录结果