PopNowDocs API
Contenu principal

Référence API de GPT Transcribe

Transcrire un fichier ou une prise de parole

Une seule clé API PopNow suffit pour appeler GPT Transcribe depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en USD et une requête à coller telle quelle dans un terminal.

Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.

En bref

Éditeur
OpenAI
Résultat
Audio
À partir de
$0.000015 USD par seconde produite

Les prix sont affichés en USD et les frais sont déduits de votre solde PopNow. Le montant maximal est réservé à la réception de la tâche, puis la consommation réelle est facturée à la fin et le solde libéré. Les tâches en échec ne sont pas facturées. Obtenez un devis exact avant de lancer avec POST /api/v1/jobs/quote.

Transcription

openai/gpt-transcribe/speech-to-text

Prix

OptionUSD
Par défaut$0.000075 par seconde produite

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
audio_urlObligatoirestring (uri)——Recording to transcribe. Maximum file size is 25 MB and duration is two hours.
languageFacultatifstring—aa, ab, ae, af, ak, am, an, ar, as, av, ay, az, ba, be, … (+170) · jusqu’à 2 caractèresTwo-letter spoken language code.
promptFacultatifstring—jusqu’à 2 048 caractèresSpelling and brief context in the language of the recording.
language_hintsFacultatifarray<object>—jusqu’à 10 élémentsLikely spoken language codes, one per row.
keytermsFacultatifarray<object>—jusqu’à 100 élémentsNames and technical vocabulary to recognize, one term per row.
temperatureFacultatifnumber—de 0 à 1Sampling temperature for recognizing the recording.

Exemple de requête

Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.

L’exemple utilise des fichiers d’exemple PopNow dans audio_url. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "openai/gpt-transcribe/speech-to-text",
  "input": {
    "prompt": "A bright, cheerful scene with soft natural light",
    "audio_url": "https://media.popnow.ai/shortfilm/voices/Aoede-46e4c427.mp3"
  }
}'

La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Transcription en temps réel

openai/gpt-transcribe/realtime-transcription

Prix

OptionUSD
Par défaut$0.000015 par seconde produite

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
audio_urlFacultatifstring (uri)——Short WAV required for a single task. Live sessions instead send raw samples over the transcription WebSocket.
max_audio_secondsFacultatifinteger15de 1 à 60Maximum admitted length of each audio segment; commit earlier at a complete phrase.
promptFacultatifstring—jusqu’à 2 048 caractèresBackground context for speech recognition, rather than an instruction to answer or summarize.
language_hintsFacultatifarray<object>—jusqu’à 10 élémentsLikely spoken language codes, one per row.
keytermsFacultatifarray<object>—jusqu’à 100 élémentsNames and technical vocabulary to recognize, one term per row.
audio_input_formatFacultatifstringpcmpcm, g711_ulaw, g711_alawEncoding of live microphone samples; PCM is 24 kHz mono 16-bit, G.711 is 8 kHz.
audio_noise_reductionFacultatifstringnear_fieldnear_field, far_field, noneInput denoising profile for a close microphone, room microphone, or preprocessed audio.
realtime_sessionFacultatifobject——Advanced native session configuration; overlapping regular controls must agree. Function tools are executed by your application.

Exemple de requête

Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "openai/gpt-transcribe/realtime-transcription",
  "input": {
    "prompt": "A bright, cheerful scene with soft natural light",
    "max_audio_seconds": 15
  }
}'

La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Pour aller plus loin

Sur cette page