curl --request POST \
--url https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_url": "https://example.com/audio.wav",
"content_type": "audio/wav"
}
'import requests
url = "https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded"
payload = {
"audio_url": "https://example.com/audio.wav",
"content_type": "audio/wav"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({audio_url: 'https://example.com/audio.wav', content_type: 'audio/wav'})
};
fetch('https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'audio_url' => 'https://example.com/audio.wav',
'content_type' => 'audio/wav'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded"
payload := strings.NewReader("{\n \"audio_url\": \"https://example.com/audio.wav\",\n \"content_type\": \"audio/wav\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"audio_url\": \"https://example.com/audio.wav\",\n \"content_type\": \"audio/wav\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"audio_url\": \"https://example.com/audio.wav\",\n \"content_type\": \"audio/wav\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"channels": [
{
"alternatives": [
{
"words": [
{
"end": 123,
"word": "<string>",
"start": 123,
"confidence": 123,
"speaker": 123,
"punctuated_word": "<string>",
"speaker_confidence": 123
}
],
"confidence": 123,
"transcript": "<string>"
}
]
}
],
"utterances": [
{
"end": 123,
"start": 123,
"speaker": 123,
"confidence": 123,
"transcript": "<string>"
}
]
},
"metadata": {
"created": "<string>",
"channels": 123,
"duration": 123,
"request_id": "<string>",
"models": [
"<string>"
],
"sha256": "<string>",
"model_info": {},
"transaction_key": "<string>"
},
"warnings": [
"<string>"
]
}Transcribe Pre-recorded Audio
curl --request POST \
--url https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"audio_url": "https://example.com/audio.wav",
"content_type": "audio/wav"
}
'import requests
url = "https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded"
payload = {
"audio_url": "https://example.com/audio.wav",
"content_type": "audio/wav"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({audio_url: 'https://example.com/audio.wav', content_type: 'audio/wav'})
};
fetch('https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'audio_url' => 'https://example.com/audio.wav',
'content_type' => 'audio/wav'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded"
payload := strings.NewReader("{\n \"audio_url\": \"https://example.com/audio.wav\",\n \"content_type\": \"audio/wav\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"audio_url\": \"https://example.com/audio.wav\",\n \"content_type\": \"audio/wav\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"audio_url\": \"https://example.com/audio.wav\",\n \"content_type\": \"audio/wav\"\n}"
response = http.request(request)
puts response.read_body{
"results": {
"channels": [
{
"alternatives": [
{
"words": [
{
"end": 123,
"word": "<string>",
"start": 123,
"confidence": 123,
"speaker": 123,
"punctuated_word": "<string>",
"speaker_confidence": 123
}
],
"confidence": 123,
"transcript": "<string>"
}
]
}
],
"utterances": [
{
"end": 123,
"start": 123,
"speaker": 123,
"confidence": 123,
"transcript": "<string>"
}
]
},
"metadata": {
"created": "<string>",
"channels": 123,
"duration": 123,
"request_id": "<string>",
"models": [
"<string>"
],
"sha256": "<string>",
"model_info": {},
"transaction_key": "<string>"
},
"warnings": [
"<string>"
]
}请求规范
- 方法与路径: POST /apis/v1/deepgram/speech-to-text-pre-recorded
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/deepgram/speech-to-text-pre-recorded - Runtime 事实版本: 28061d27008061cbecfcaf7d1a3f1cc9280a40fce8644055c6968a360c2daf23
{
"operationId": "deepgram.speech-to-text-pre-recorded",
"method": "POST",
"path": "/apis/v1/deepgram/speech-to-text-pre-recorded",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"audio_url",
"content_type"
],
"properties": {
"tier": {
"type": "string",
"const": "enhanced",
"description": "Enhanced tier for higher-accuracy recognition. Requires your own Deepgram key."
},
"model": {
"type": "string",
"examples": [
"nova-3"
],
"description": "Deepgram model to use (e.g., 'nova-3', 'general', 'phonecall'). Without your own Deepgram key, only 'nova-3' is supported and is used when omitted."
},
"diarize": {
"type": "boolean",
"description": "Enable speaker diarization if true. Requires your own Deepgram key."
},
"keyterm": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"invoice",
"payment terms",
"customer name"
]
],
"description": "List of keyterms to boost in the transcript. Supported by Nova-3 and Flux models only. Use simple terms without intensifiers (e.g., 'invoice', 'payment terms'). For other models, use 'keywords' instead. Requires your own Deepgram key."
},
"version": {
"type": "string",
"description": "Specific model version to use. Requires your own Deepgram key."
},
"keywords": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"invoice:5",
"payment:3"
]
],
"description": "List of keywords to boost in the transcript. Supported by Nova-2, Nova-1, Enhanced, and Base models. Format: 'keyword:intensifier' (e.g., 'invoice:5'). For Nova-3 or Flux models, use 'keyterm' instead. Requires your own Deepgram key."
},
"language": {
"type": "string",
"examples": [
"en-US"
],
"description": "Language code for transcription (e.g., 'en-US'). Without your own Deepgram key, only 'en' or 'en-US' is supported and 'en' is used when omitted."
},
"audio_url": {
"type": "string",
"format": "uri",
"examples": [
"https://example.com/audio.wav"
],
"maxLength": 2083,
"minLength": 1,
"description": "Public URL of the audio file to transcribe. Must be a direct, publicly downloadable media file URL — not a preview page, auth-gated link, or expiring/short-lived URL."
},
"punctuate": {
"type": "boolean",
"description": "Automatically punctuate transcript."
},
"alternatives": {
"type": "integer",
"minimum": 1,
"description": "Number of alternative transcripts to return."
},
"content_type": {
"enum": [
"audio/wav",
"audio/mp3",
"audio/mpeg",
"audio/flac",
"audio/webm"
],
"type": "string",
"examples": [
"audio/wav",
"audio/mp3"
],
"description": "MIME type of the audio file. Without your own Deepgram key, only 'audio/wav' is supported."
},
"smart_format": {
"type": "boolean",
"description": "Apply smart formatting (capitalization/punctuation)."
},
"detect_language": {
"type": "boolean",
"description": "Automatically detect language if true. Prefer explicit `language` over this when the audio language is known; auto-detection reduces accuracy for non-English content. Requires your own Deepgram key."
},
"interim_results": {
"type": "boolean",
"description": "Return interim results if true. Requires your own Deepgram key."
}
}
}
}
}
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "response_units",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"default_request_estimate_usd": 0.0103,
"estimate_source": "profile_seed",
"evidence_source": "response_body",
"maximum_units": 10000000,
"unit": "provider_credit",
"unit_rate_usd": 1e-06
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
按用量计费;默认请求预估费用:$0.0103 USD(不是固定价格)。 声明的单位费率:每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。- 默认请求参考估价(USD): 0.0103
- 声明的单位费率(USD): 1e-06
- 计费单位: provider_credit
- 计费依据: response_units
- 公开参考倍率: 1.0
- 声明的最大计数或单位数: 10000000
- 结算证据来源: response_body
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
Public URL of the audio file to transcribe. Must be a direct, publicly downloadable media file URL — not a preview page, auth-gated link, or expiring/short-lived URL.
1 - 2083"https://example.com/audio.wav"
MIME type of the audio file. Without your own Deepgram key, only 'audio/wav' is supported.
audio/wav, audio/mp3, audio/mpeg, audio/flac, audio/webm "audio/wav"
"audio/mp3"
Enhanced tier for higher-accuracy recognition. Requires your own Deepgram key.
"enhanced"Deepgram model to use (e.g., 'nova-3', 'general', 'phonecall'). Without your own Deepgram key, only 'nova-3' is supported and is used when omitted.
"nova-3"
Enable speaker diarization if true. Requires your own Deepgram key.
List of keyterms to boost in the transcript. Supported by Nova-3 and Flux models only. Use simple terms without intensifiers (e.g., 'invoice', 'payment terms'). For other models, use 'keywords' instead. Requires your own Deepgram key.
["invoice", "payment terms", "customer name"]
Specific model version to use. Requires your own Deepgram key.
List of keywords to boost in the transcript. Supported by Nova-2, Nova-1, Enhanced, and Base models. Format: 'keyword:intensifier' (e.g., 'invoice:5'). For Nova-3 or Flux models, use 'keyterm' instead. Requires your own Deepgram key.
["invoice:5", "payment:3"]
Language code for transcription (e.g., 'en-US'). Without your own Deepgram key, only 'en' or 'en-US' is supported and 'en' is used when omitted.
"en-US"
Automatically punctuate transcript.
Number of alternative transcripts to return.
x >= 1Apply smart formatting (capitalization/punctuation).
Automatically detect language if true. Prefer explicit language over this when the audio language is known; auto-detection reduces accuracy for non-English content. Requires your own Deepgram key.
Return interim results if true. Requires your own Deepgram key.