Skip to content

Commit 5b6e72a

Browse files
Cartesian new model
1 parent 94770de commit 5b6e72a

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Cartesia
3+
pcx_content_type: get-started
4+
---
5+
6+
[Cartesia](https://docs.cartesia.ai/) provides advanced text-to-speech services with customizable voice models.
7+
8+
## Endpoint
9+
10+
```txt
11+
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cartesia
12+
```
13+
14+
## URL Structure
15+
16+
When making requests to Cartesia, replace `https://api.cartesia.ai/v1` in the URL you are currently using with `https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cartesia`.
17+
18+
## Prerequisites
19+
20+
When making requests to Cartesia, ensure you have the following:
21+
22+
- Your AI Gateway Account ID.
23+
- Your AI Gateway gateway name.
24+
- An active Cartesia API token.
25+
- The model ID and voice ID for the Cartesia voice model you want to use.
26+
27+
## Example
28+
29+
### cURL
30+
31+
```bash title="Request"
32+
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cartesia/tts/bytes \
33+
--header 'Content-Type: application/json' \
34+
--header 'Cartesia-Version: 2024-06-10' \
35+
--header 'X-API-Key: {cartesia_api_token}' \
36+
--data '{
37+
"transcript": "Welcome to Cloudflare - AI Gateway!",
38+
"model_id": "sonic-english",
39+
"voice": {
40+
"mode": "id",
41+
"id": "694f9389-aac1-45b6-b726-9d9369183238"
42+
},
43+
"output_format": {
44+
"container": "wav",
45+
"encoding": "pcm_f32le",
46+
"sample_rate": 44100
47+
}
48+
}
49+
```

0 commit comments

Comments
 (0)