---
agent:
  instructions: "Search the site by keyword or question. The search API returns Markdown."
  endpoint: "https://platform.invideo.io/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Deepgram and Cartesia

> Use Deepgram's and Cartesia's own speech APIs with the Platform. Every speech-to-text and text-to-speech model answers.

## Deepgram

Base URL:

```text
https://platform-api.invideo.io/deepgram
```

`POST /v1/listen` takes the audio as the body (or `{"url": ...}`) and the options in the query; the answer is Deepgram's `results.channels[].alternatives[]`. Set `INVIDEO_TRANSCRIPTION_MODEL` to an enabled speech-to-text model from `GET /v1/models?modality=audio`.

```bash
curl -X POST "https://platform-api.invideo.io/deepgram/v1/listen?model=${INVIDEO_TRANSCRIPTION_MODEL:?Choose an enabled speech-to-text model}&smart_format=true" \
  -H "Authorization: Token $INVIDEO_API_KEY" -H "Content-Type: audio/mpeg" --data-binary @meeting.mp3
```

## Cartesia

Base URL:

```text
https://platform-api.invideo.io/cartesia
```


- `POST /tts/bytes` takes Cartesia's JSON (`model_id`, `transcript`, `voice: {mode: "id", id}`) and answers the audio. `output_format` is not applied: the audio is in the model's own format (see `Content-Type`).
- `POST /stt` takes the multipart `file` and answers `text`, `language`, `duration` and `words`.

Both answer when the run ends.
