#Help Solved 401

1 messages · Page 1 of 1 (latest)

autumn tangle
#

Cartesia: (message: string, key: string, data: { model: string, voice: string, speed: string }) => ({
apiURL: 'https://api.cartesia.ai/tts/sse',
headers: {
'X-API-Key': ${key},
'Cartesia-Version': '2024-06-10',
'Content-Type': 'application/json'
},
data: {
model_id: data.model || 'sonic-english',
transcript: message,
voice: {
mode: 'id',
id: data.voice || 'a0e99841-438c-4a64-b679-ae501e7d6091',
},
},
output_format: {
'container': 'raw',
'encoding': 'pcm_s16le',
'sample_rate': 22050
}
}),

mendapatkan response 401 Unauthorized

spice wyvern
#

hey @autumn tangle! this typically corresponds to an issue with your API key, could you try issuing a new one on your playground and using that with the POST request?

autumn tangle
spice wyvern
#

awesome, let us know if there’s anything else!