Skip to main content
POST
/
infill
/
bytes
Infill (Bytes)
curl --request POST \
  --url https://api.cartesia.ai/infill/bytes \
  --header 'Authorization: Bearer <token>' \
  --header 'Cartesia-Version: <cartesia-version>' \
  --header 'Content-Type: multipart/form-data' \
  --form left_audio='@example-file' \
  --form right_audio='@example-file' \
  --form 'model_id=<string>' \
  --form 'language=<string>' \
  --form 'transcript=<string>' \
  --form 'voice_id=<string>' \
  --form 'output_format[container]=raw' \
  --form 'output_format[sample_rate]=8000' \
  --form 'output_format[encoding]=pcm_f32le' \
  --form 'output_format[bit_rate]=123'

Authorizations

Authorization
string
header
required

Cartesia API key

Headers

Cartesia-Version
enum<string>
required

API version header. Must be set to the API version, e.g. '2024-06-10'.

Available options:
2024-06-10,
2024-11-13,
2025-04-16
Example:

"2025-04-16"

Body

multipart/form-data
left_audio
file
right_audio
file
model_id
string

The ID of the model to use for generating audio. Any model other than the first "sonic" model is supported.

language
string

The language of the transcript

transcript
string

The infill text to generate

voice_id
string

The ID of the voice to use for generating audio

output_format[container]
enum<string>

The format of the output audio

Available options:
raw,
wav,
mp3
output_format[sample_rate]
enum<integer>

The sample rate of the output audio

Available options:
8000,
16000,
22050,
24000,
44100,
48000
output_format[encoding]
enum<string> | null

Required for raw and wav containers.

Available options:
pcm_f32le,
pcm_s16le,
pcm_mulaw,
pcm_alaw
output_format[bit_rate]
integer | null

Required for mp3 containers.

Response

204 - undefined