Node.js / TypeScript
Node ≥ 18ReferenceSource soon
— Install
# No package published yet — call the REST API directly
— Usage
// The REST API is the supported interface today.
const res = await fetch('https://api.rexa.ai/v1/calls', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.REXA_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
provider: 'telnyx',
to: '+15551234567',
from: '+15557654321',
voice_id: 'alloy',
prompt: 'Hello! Who am I speaking with?',
}),
});
const call = await res.json();