CosmicAC Logo

Transcribe audio with a Parakeet endpoint

Upload an audio file to a Parakeet endpoint and get a transcription with curl.

Upload an audio file to a Parakeet endpoint and get a transcription. The endpoint is OpenAI-compatible, so you send a multipart form request from curl or any OpenAI-compatible client.

Prerequisites

You need the following before you start:

Steps

Find your endpoint name

List your endpoints:

cosmicac models healthcheck

Each endpoint appears as Endpoint: <endpoint-name>. Copy the name of your Parakeet endpoint.

Get your inference URL

Copy the INFERENCE_APP_NODE_URL value:

cosmicac config show

Send the audio file

Replace <inference-url> with your INFERENCE_APP_NODE_URL, <endpoint-name> with the endpoint name you set, <api-key> with the key you created, and <audio-file> with the path to your file:

You need the API key only if you enabled Require Authorization header when you created the job. Otherwise, omit the Authorization header.

curl -X POST <inference-url>/v1/endpoints/<endpoint-name>/v1/audio/transcriptions \
  -H "Authorization: Bearer <api-key>" \
  -F "file=@<audio-file>" \
  -F "model=<endpoint-name>"

The endpoint name in the URL selects the model. The endpoint returns the transcription.

Next steps

On this page