Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,17 @@ Documentation is automatically updated when you push to main via the
npm install -g fern-api # only required once
fern generate --docs
```

## Generating preview SDKs

```sh
fern generate --preview --api version-2025-04-16 --group ts-sdk
fern generate --preview --api version-2025-04-16 --group python-sdk
```

Generated SDKs are available in `docs/fern/apis/version-2025-04-16/.preview/`:

```sh
$ ls fern/apis/version-2025-04-16/.preview
fern-python-sdk fern-typescript-node-sdk
```
2 changes: 2 additions & 0 deletions fern/apis/version-2024-06-10/definition/api-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ service:
response: APIInfo
examples:
- name: API Status and Version
headers:
Cartesia-Version: "2024-06-10"
response:
body:
ok: true
Expand Down
6 changes: 6 additions & 0 deletions fern/apis/version-2024-06-10/definition/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ service:
response: TokenResponse
examples:
- name: Generate Access Token with TTS and STT Access
headers:
Cartesia-Version: "2024-06-10"
request:
grants:
tts: true
Expand All @@ -21,6 +23,8 @@ service:
body:
token: "eyJhbGciOiJIUzI1NiIsImtpZCI6InNzaWRfYmFmM2ViZDlhNTY0YWRjZmRlZTRlMGYifQ.eyJncmFudHMiOnsidHRzIjp0cnVlLCJzdHQiOnRydWV9LCJqdGkiOiJpYXQiLCJ1bmRlZmluZWQiOjE3NDM1MzA1NjcsImlzcyI6Imh0dHBzOi8vYXBpLmNhcnRlc2lhLmFpIiwic3ViIjoidXNlcl9iYWYzZWJkOWE1NjRhZGNmZGVlNGUwZiIsImV4cCI6MTc0MzUzNDE2N30.example"
- name: Generate TTS-Only Access Token
headers:
Cartesia-Version: "2024-06-10"
request:
grants:
tts: true
Expand All @@ -29,6 +33,8 @@ service:
body:
token: "eyJhbGciOiJIUzI1NiIsImtpZCI6InNzaWRfYmFmM2ViZDlhNTY0YWRjZmRlZTRlMGYifQ.eyJncmFudHMiOnsidHRzIjp0cnVlfSwianRpIjoiaWF0IiwidW5kZWZpbmVkIjoxNzQzNTMwNTY3LCJpc3MiOiJodHRwczovL2FwaS5jYXJ0ZXNpYS5haSIsInN1YiI6InVzZXJfYmFmM2ViZDlhNTY0YWRjZmRlZTRlMGYiLCJleHAiOjE3NDM1MzQxNjd9.9SI-d6azyelW4QiIOMDON_EX9Yb0qybu71W_fbnM9TQ"
- name: Generate STT-Only Access Token
headers:
Cartesia-Version: "2024-06-10"
request:
grants:
stt: true
Expand Down
4 changes: 4 additions & 0 deletions fern/apis/version-2024-06-10/definition/infill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ service:
response: file
examples:
- name: MP3
headers:
Cartesia-Version: "2024-06-10"
request:
model_id: sonic-2
language: en
Expand All @@ -88,6 +90,8 @@ service:
voice[__experimental_controls][speed]: slowest
voice[__experimental_controls][emotion][]: [surprise:high, curiosity:high]
- name: WAV
headers:
Cartesia-Version: "2024-06-10"
request:
model_id: sonic-2
language: en
Expand Down
4 changes: 4 additions & 0 deletions fern/apis/version-2024-06-10/definition/stt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ service:
response: TranscriptionResponse
examples:
- name: Basic Transcription
headers:
Cartesia-Version: "2024-06-10"
request:
model: "ink-whisper"
language: "en"
Expand All @@ -174,6 +176,8 @@ service:
language: "en"
duration: 2.5
- name: With Word Timestamps
headers:
Cartesia-Version: "2024-06-10"
request:
model: "ink-whisper"
language: "en"
Expand Down
12 changes: 12 additions & 0 deletions fern/apis/version-2024-06-10/definition/tts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ service:
response: file
examples:
- name: MP3
headers:
Cartesia-Version: "2024-06-10"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -28,6 +30,8 @@ service:
sample_rate: 44100
bit_rate: 128000
- name: WAV
headers:
Cartesia-Version: "2024-06-10"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -40,6 +44,8 @@ service:
sample_rate: 44100
encoding: "pcm_f32le"
- name: RAW
headers:
Cartesia-Version: "2024-06-10"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -62,6 +68,8 @@ service:
format: sse
examples:
- name: SSE
headers:
Cartesia-Version: "2024-06-10"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -74,6 +82,8 @@ service:
sample_rate: 44100
encoding: "pcm_f32le"
- name: SSE with Timestamps
headers:
Cartesia-Version: "2024-06-10"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand Down Expand Up @@ -145,6 +155,8 @@ channel:

examples:
- name: Generation Example
headers:
Cartesia-Version: "2024-06-10"
messages:
- type: send
body:
Expand Down
12 changes: 12 additions & 0 deletions fern/apis/version-2024-06-10/definition/voice-changer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,24 @@ service:
response: file
examples:
- name: MP3
headers:
Cartesia-Version: "2024-06-10"
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: mp3
output_format[sample_rate]: 44100
output_format[bit_rate]: 128000
- name: WAV
headers:
Cartesia-Version: "2024-06-10"
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: wav
output_format[sample_rate]: 44100
output_format[encoding]: pcm_f32le
- name: RAW
headers:
Cartesia-Version: "2024-06-10"
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: raw
Expand Down Expand Up @@ -87,18 +93,24 @@ service:
response-stream: StreamingResponse
examples:
- name: MP3
headers:
Cartesia-Version: "2024-06-10"
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: mp3
output_format[sample_rate]: 44100
output_format[bit_rate]: 128000
- name: WAV
headers:
Cartesia-Version: "2024-06-10"
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: wav
output_format[sample_rate]: 44100
output_format[encoding]: pcm_f32le
- name: RAW
headers:
Cartesia-Version: "2024-06-10"
request:
voice[id]: "694f9389-aac1-45b6-b726-9d9369183238"
output_format[container]: raw
Expand Down
8 changes: 8 additions & 0 deletions fern/apis/version-2024-06-10/definition/voices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ service:
response: VoiceMetadata
examples:
- name: Stability
headers:
Cartesia-Version: "2024-06-10"
request:
# clip: file
name: "A high-stability cloned voice"
Expand All @@ -274,6 +276,8 @@ service:
created_at: "2024-11-13T07:06:22.476564Z"
language: en
- name: Similarity
headers:
Cartesia-Version: "2024-06-10"
request:
# clip: file
name: "A high-similarity cloned voice"
Expand Down Expand Up @@ -324,6 +328,8 @@ service:
response: VoiceMetadata
examples:
- name: Localize Voice
headers:
Cartesia-Version: "2024-06-10"
request:
voice_id: "694f9389-aac1-45b6-b726-9d9369183238"
name: "Sarah Peninsular Spanish"
Expand Down Expand Up @@ -358,6 +364,8 @@ service:
response: VoiceMetadata
examples:
- name: Create Voice
headers:
Cartesia-Version: "2024-06-10"
request:
name: "My Custom Voice"
description: "A custom voice created through the API"
Expand Down
4 changes: 2 additions & 2 deletions fern/apis/version-2024-06-10/generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ groups:
python-sdk:
generators:
- name: fernapi/fern-python-sdk
version: 4.3.13
version: 4.28.0
output:
location: pypi
package-name: "cartesia"
Expand All @@ -31,7 +31,7 @@ groups:
ts-sdk:
generators:
- name: fernapi/fern-typescript-node-sdk
version: 0.48.4
version: 0.51.7
output:
location: npm
package-name: "@cartesia/cartesia-js"
Expand Down
2 changes: 2 additions & 0 deletions fern/apis/version-2024-11-13/definition/api-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ service:
response: APIInfo
examples:
- name: API Status and Version
headers:
Cartesia-Version: "2024-11-13"
response:
body:
ok: true
Expand Down
6 changes: 6 additions & 0 deletions fern/apis/version-2024-11-13/definition/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ service:
response: TokenResponse
examples:
- name: Generate Access Token with TTS and STT Access
headers:
Cartesia-Version: "2024-11-13"
request:
grants:
tts: true
Expand All @@ -21,6 +23,8 @@ service:
body:
token: "eyJhbGciOiJIUzI1NiIsImtpZCI6InNzaWRfYmFmM2ViZDlhNTY0YWRjZmRlZTRlMGYifQ.eyJncmFudHMiOnsidHRzIjp0cnVlLCJzdHQiOnRydWV9LCJqdGkiOiJpYXQiLCJ1bmRlZmluZWQiOjE3NDM1MzA1NjcsImlzcyI6Imh0dHBzOi8vYXBpLmNhcnRlc2lhLmFpIiwic3ViIjoidXNlcl9iYWYzZWJkOWE1NjRhZGNmZGVlNGUwZiIsImV4cCI6MTc0MzUzNDE2N30.example"
- name: Generate TTS-Only Access Token
headers:
Cartesia-Version: "2024-11-13"
request:
grants:
tts: true
Expand All @@ -29,6 +33,8 @@ service:
body:
token: "eyJhbGciOiJIUzI1NiIsImtpZCI6InNzaWRfYmFmM2ViZDlhNTY0YWRjZmRlZTRlMGYifQ.eyJncmFudHMiOnsidHRzIjp0cnVlfSwianRpIjoiaWF0IiwidW5kZWZpbmVkIjoxNzQzNTMwNTY3LCJpc3MiOiJodHRwczovL2FwaS5jYXJ0ZXNpYS5haSIsInN1YiI6InVzZXJfYmFmM2ViZDlhNTY0YWRjZmRlZTRlMGYiLCJleHAiOjE3NDM1MzQxNjd9.9SI-d6azyelW4QiIOMDON_EX9Yb0qybu71W_fbnM9TQ"
- name: Generate STT-Only Access Token
headers:
Cartesia-Version: "2024-11-13"
request:
grants:
stt: true
Expand Down
4 changes: 4 additions & 0 deletions fern/apis/version-2024-11-13/definition/infill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ service:
response: file
examples:
- name: MP3
headers:
Cartesia-Version: "2024-11-13"
request:
model_id: sonic-2
language: en
Expand All @@ -88,6 +90,8 @@ service:
voice[__experimental_controls][speed]: slowest
voice[__experimental_controls][emotion][]: [surprise:high, curiosity:high]
- name: WAV
headers:
Cartesia-Version: "2024-11-13"
request:
model_id: sonic-2
language: en
Expand Down
6 changes: 6 additions & 0 deletions fern/apis/version-2024-11-13/definition/stt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ service:
response: TranscriptionResponse
examples:
- name: Basic Transcription
headers:
Cartesia-Version: "2024-11-13"
request:
model: "ink-whisper"
language: "en"
Expand All @@ -174,6 +176,8 @@ service:
language: "en"
duration: 2.5
- name: With Word Timestamps
headers:
Cartesia-Version: "2024-11-13"
request:
model: "ink-whisper"
language: "en"
Expand Down Expand Up @@ -399,6 +403,8 @@ channel:

examples:
- name: Streaming Transcription Session
headers:
Cartesia-Version: "2024-11-13"
messages:
- type: send
body: "<binary audio data - send as binary WebSocket message>"
Expand Down
12 changes: 12 additions & 0 deletions fern/apis/version-2024-11-13/definition/tts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ service:
response: file
examples:
- name: MP3
headers:
Cartesia-Version: "2024-11-13"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -28,6 +30,8 @@ service:
sample_rate: 44100
bit_rate: 128000
- name: WAV
headers:
Cartesia-Version: "2024-11-13"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -40,6 +44,8 @@ service:
sample_rate: 44100
encoding: "pcm_f32le"
- name: RAW
headers:
Cartesia-Version: "2024-11-13"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -62,6 +68,8 @@ service:
format: sse
examples:
- name: SSE
headers:
Cartesia-Version: "2024-11-13"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand All @@ -74,6 +82,8 @@ service:
sample_rate: 44100
encoding: "pcm_f32le"
- name: SSE with Timestamps
headers:
Cartesia-Version: "2024-11-13"
request:
model_id: "sonic-2"
transcript: "Hello, world!"
Expand Down Expand Up @@ -145,6 +155,8 @@ channel:

examples:
- name: Generation Example
headers:
Cartesia-Version: "2024-11-13"
messages:
- type: send
body:
Expand Down
Loading
Loading