Saltar para o conteúdo principal
POST
/
v1
/
audio
/
speech
curl --request POST \
  --url https://api.apimart.ai/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-4o-mini-tts",
    "input": "The quick brown fox jumps over the lazy dog.",
    "voice": "alloy",
    "response_format": "opus",
    "speed": 1.0
  }' \
  --output speech.opus
Binary audio data stream

Documentation Index

Fetch the complete documentation index at: https://docs.apimart.ai/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST \
  --url https://api.apimart.ai/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-4o-mini-tts",
    "input": "The quick brown fox jumps over the lazy dog.",
    "voice": "alloy",
    "response_format": "opus",
    "speed": 1.0
  }' \
  --output speech.opus
Binary audio data stream

Autorizações

Authorization
string
obrigatório
Todas as APIs exigem autenticação por Bearer TokenObtenha sua chave de API:Acesse a página de gerenciamento de chaves de API para obter sua chave de APIAdicione-a ao cabeçalho da requisição:
Authorization: Bearer YOUR_API_KEY

Body

model
string
padrão:"gpt-4o-mini-tts"
obrigatório
Nome do modelo TTSModelos disponíveis:
  • gpt-4o-mini-tts - modelo GPT-4o Mini TTS
Exemplo: "gpt-4o-mini-tts"
input
string
obrigatório
O texto a ser convertido em falaTamanho máximo: 4096 caracteresExemplo: "The quick brown fox jumps over the lazy dog."
voice
string
obrigatório
Seleção de vozVozes disponíveis:
  • alloy - voz neutra e equilibrada
  • echo - voz masculina e calma
  • fable - voz britânica, narrativa
  • onyx - voz masculina e grave
  • nova - voz feminina e enérgica
  • shimmer - voz feminina e suave
Exemplo: