SDKsChangelog
API Platform · Docs

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:

Authentication

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.

Quickstart

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.

quickstart.sh
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.

Request body
{
  "voice": "aria",
  "text": "Hello — welcome to Sunesis.",
  "format": "mp3",
  "speed": 1.0
}
Response
{
  "id": "gen_8f2a",
  "status": "completed",
  "audio_url": "https://cdn.sunesis.ai/voice/gen_8f2a.mp3",
  "duration_ms": 1840
}
Try it live

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.

SDKs

Official client libraries

Install
npm install @sunesis/sdk
Example
import { 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);
Webhooks

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.

job.completed.json
{
  "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
  }
}
Errors

HTTP status codes

400
Bad Request

Missing or invalid request body parameters.

401
Unauthorized

Invalid or missing API key in the Authorization header.

403
Forbidden

Your plan doesn't include this endpoint or feature.

404
Not Found

The resource (voice, avatar, agent, job) doesn't exist.

429
Rate Limited

You have exceeded your plan's request quota. Retry after the window resets.

500
Internal Error

Server-side error. Retry with exponential backoff or contact support.

Limits

Rate limits & quotas

Free tier10,000 credits / month
Pro tier600,000 credits / month
EnterpriseCustom
Burst limit: 100 requests / 10 seconds per key.
Resources

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