Reference you can actually read
Every endpoint, parameter, and error code — with copy-paste examples in cURL, TypeScript, and Python. Built to be skimmed, not studied.
The Sunesis API is organized into four areas that all share one auth model and base URL (api.sunesis.ai/v1). Jump straight to what you need:
Every request is authenticated with a bearer token in the Authorization header. Keys are issued from your dashboard once you sign up — there's nothing to configure here until then.
Authorization: Bearer sk_sunesis_<your_key>No key yet? Create a free account to generate one — free tier included, no card required.
Make your first call
Authenticate with a bearer token and POST JSON. That's the whole auth model.
Grab your API key
Generate one in the dashboard. Scope it per-environment.
Pick an endpoint
Voice, video, avatar, or agents. All share the same base URL.
Stream or poll
Short jobs return inline; long ones give you a job ID and a webhook.
curl https://api.sunesis.ai/v1/voice/generate \
-H "Authorization: Bearer $SUNESIS_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice": "aria",
"text": "Hello — welcome to Sunesis.",
"format": "mp3"
}'Voice API
Synthesize, stream, clone, and translate speech. Every voice endpoint shares the same auth model and returns either an inline result or a job you poll.
{
"voice": "aria",
"text": "Hello — welcome to Sunesis.",
"format": "mp3",
"speed": 1.0
}{
"id": "gen_8f2a",
"status": "completed",
"audio_url": "https://cdn.sunesis.ai/voice/gen_8f2a.mp3",
"duration_ms": 1840
}Video & Avatars
Turn a script into a talking-head video, or train a reusable custom avatar from a short clip. Renders are async — poll the job or subscribe to a webhook.
Conversational Agents
Create agents with persistent memory and tool use, then converse with them over text, voice, or video — all through the same session model.
Platform
Jobs, usage, and account-level endpoints that every product line shares.
Official client libraries
npm install @sunesis/sdkimport { Sunesis } from "@sunesis/sdk";
const sunesis = new Sunesis({ apiKey: process.env.SUNESIS_KEY });
const { audio } = await sunesis.voice.generate({
voice: "aria",
text: "Hello — welcome to Sunesis.",
format: "mp3",
});
console.log(audio.url);Get pushed instead of polling
Register a webhook URL in the dashboard and we'll POST events for jobs, usage thresholds, and errors.
Verified signatures
Every webhook includes a Sunesis-Signature header. Verify with your webhook secret.
Automatic retries
Failed deliveries retry with exponential backoff for up to 24 hours.
Event types
job.completed, job.failed, avatar.trained, usage.threshold.reached, and more.
{
"event": "job.completed",
"timestamp": "2026-07-10T14:00:00Z",
"data": {
"id": "job_7d4e",
"type": "avatar.render",
"status": "completed",
"result_url": "https://cdn.sunesis.ai/avatar/job_7d4e.mp4",
"duration_seconds": 42
}
}HTTP status codes
Missing or invalid request body parameters.
Invalid or missing API key in the Authorization header.
Your plan doesn't include this endpoint or feature.
The resource (voice, avatar, agent, job) doesn't exist.
You have exceeded your plan's request quota. Retry after the window resets.
Server-side error. Retry with exponential backoff or contact support.
Rate limits & quotas
Keep building
Get your API key.
Free tier with 10,000 credits/month. No credit card required.
SOC 2 Type II · GDPR · HIPAA-ready · No vendor lock-in