Documentation

Build with our API.

One bearer token. Every employee. 905+ media models. The same credit balance powers the web app, your scripts, your agents, and your customers' calls into our API.

Section

Quickstart

Everything you can do in the web app you can do via the API. Same credits, same employees, same media models — exposed as HTTPS endpoints under https://automatebusiness.com/api/v1.

Your first call

The status endpoint is unauthenticated — paste it into your terminal to confirm the API is reachable from your machine.

curl https://automatebusiness.com/api/v1/status

You should see something like:

{
  "ok": true,
  "service": "automatebusinessnow",
  "version": "v1",
  "timestamp": "2026-04-25T00:00:00.000Z"
}

Now run a real job. Replace abn_YOUR_KEY_HERE with a key from your API keys page.

curl https://automatebusiness.com/api/v1/chat \
  -H "Authorization: Bearer abn_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "employeeSlug": "copywriter",
    "prompt": "Write 3 punchy headlines for a coffee shop"
  }'

Credits & billing

Every API call deducts from the same credit balance you see at /app/credits. Failed jobs auto-refund. Plan credits refresh monthly; top-up credits never expire.

Heads-up: when a single API key burns more than 100,000 credits in 60 seconds ($1,000/min sustained), the key is auto-revoked as a safety circuit. That ceiling sits well above any legitimate single-call cost — the most expensive video models run ~1,800–6,000 credits per call — but it stops a runaway loop dead before it bleeds your balance. Generate a new key from /app/api-keys if it ever trips. For vetted high-volume accounts we lift the cap — email hello@automatebusiness.com.

Section

Authentication

All /v1/* endpoints (except /v1/status) require a bearer token. You can have an unlimited number of keys per account, name them per integration, and revoke them individually.

Creating keys

Open /app/api-keys in the web app, give your key a name ("Zapier", "internal-script", etc.), and copy the resulting abn_… string. Keys are shown once at creation and never again — store them in your secret manager.

Sending the bearer

Authorization: Bearer abn_YOUR_KEY_HERE

Anything else (no header, malformed prefix, revoked key) returns 401 { "ok": false, "error": "Unauthorized" }.

Section

Async pattern (use like Wavespeed)

Every endpoint that runs a model accepts a synchronous call, but for production workloads the async submit-then-poll patternis cleaner: submit returns instantly with a job id, you poll a status endpoint until the result is ready. Same contract Wavespeed exposes — drop-in compatible with any poll-loop you've already written.

POST /v1/jobs/submit

Submit a job. Returns 202 Accepted in ~1s with a job id and a poll URL. Credits are reserved up-front; you get a fast 402 if the balance is too low.

curl https://automatebusiness.com/api/v1/jobs/submit \
  -H "Authorization: Bearer abn_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "modelId": "openai/gpt-image-2/text-to-image",
    "prompt": "A pixel-art mushroom",
    "aspect_ratio": "1:1",
    "quality": "medium",
    "resolution": "1k"
  }'
{
  "ok": true,
  "jobId": "abn_job_J-ZydDf8bghNUF8RYKS-nA",
  "modelId": "openai/gpt-image-2/text-to-image",
  "status": "submitted",
  "estimateCredits": 18,
  "pollUrl": "/api/v1/jobs/abn_job_J-ZydDf8bghNUF8RYKS-nA",
  "createdAt": "2026-04-25T02:07:30.467Z"
}

Body shape is flat — top-level params alongsidemodelId. The legacy nested form { "modelId": "...", "params": { ... } } is also accepted.

GET /v1/jobs/{id}

Single-shot poll. Non-blocking. Returns the current status; on completion finalizes the credit ledger atomically and returns the output URL. Subsequent polls of a completed job are idempotent — they re-read the cached terminal state, balance doesn't change.

curl https://automatebusiness.com/api/v1/jobs/abn_job_... \
  -H "Authorization: Bearer abn_YOUR_KEY_HERE"

While running:

{
  "ok": true,
  "jobId": "abn_job_...",
  "modelId": "openai/gpt-image-2/text-to-image",
  "status": "running",
  "estimateCredits": 18,
  "createdAt": "..."
}

On completion:

{
  "ok": true,
  "jobId": "abn_job_...",
  "modelId": "openai/gpt-image-2/text-to-image",
  "status": "completed",
  "outputUrl": "https://...png",
  "creditsUsed": 18,
  "balance": 18093,
  "createdAt": "...",
  "completedAt": "..."
}

On failure (credits auto-refunded):

{
  "ok": false,
  "jobId": "abn_job_...",
  "modelId": "...",
  "status": "failed",
  "error": "human-readable sentence",
  "creditsUsed": 0,
  "createdAt": "..."
}

Polling cadence: 4–8 seconds is plenty. Most image jobs land in 30–60s; videos and music in 1–4 minutes.

Section

Endpoints

Every endpoint accepts and returns application/json. Responses are always shaped { ok, ... } on success and { ok: false, error } on failure.

POST/v1/chat

Run any text-employee job.

Request
{
  "employeeSlug": "copywriter",
  "prompt": "Write 3 cold-email subject lines for HVAC contractors",
  "imageUrl": null,
  "fileContext": null
}
Response
{
  "ok": true,
  "employeeSlug": "copywriter",
  "kind": "text",
  "message": "1. \"Your inbox is leaking leads...\"\n2. ...",
  "imageUrl": null,
  "provider": "ai",
  "creditsUsed": 2,
  "balance": 18119
}
POST/v1/images

Generate an image with the Graphic Designer employee.

Request
{
  "prompt": "Minimalist logo for a coffee shop named Hearth",
  "aspect_ratio": "1:1"
}
Response
{
  "ok": true,
  "outputUrl": "https://...png",
  "creditsUsed": 8,
  "balance": 18111
}
POST/v1/videos

Generate a short video clip.

Request
{
  "prompt": "Pixel-art cat walking across a desk",
  "duration": 5
}
Response
{
  "ok": true,
  "outputUrl": "https://...mp4",
  "creditsUsed": 150,
  "balance": 17961
}
POST/v1/voice

Text-to-speech via the wavespeed catalog (returns a URL, not a stream).

Request
{
  "text": "Welcome to Hearth Coffee. We open at 7.",
  "voice": "alloy"
}
Response
{
  "ok": true,
  "outputUrl": "https://...mp3",
  "creditsUsed": 4,
  "balance": 17957
}
POST/v1/voice/synthesize

Voice-agent-grade TTS — streams audio bytes back as the provider generates them. Sub-second time-to-first-byte for live voice agents.

Request
{
  "text": "Hi, thanks for calling. How can I help you today?",
  "voice": "warm-female",
  "format": "mp3",
  "model": "fast"
}
Response
Streamed audio bytes (Content-Type: audio/mpeg or audio/L16).
Headers: X-Credits-Used, X-Voice-Format.

Catalog voices: warm-female, deep-male, energetic-female,
  british-male, young-female, podcast-host.
  Or pass a 20-char raw voice id directly.
Formats: mp3 (default) | pcm_16000 (telephony pipelines).
Models:  fast (~300ms TTFB) | quality (better prosody, slower).
Billing: 1 credit per 50 chars on fast,
         1 credit per 25 chars on quality.
POST/v1/voice/transcribe

Speech-to-text with word-level timestamps. multipart/form-data with an `audio` field. Up to 25 MB / 1 hour.

Request
# multipart/form-data
audio:    <binary mp3/wav/m4a/ogg/webm>
language: en          # optional — auto-detect if omitted
diarize:  true        # optional — speaker labels per word
Response
{
  "ok": true,
  "text": "the full transcript here",
  "words": [
    { "word": "the",  "start": 0.12, "end": 0.18 },
    { "word": "full", "start": 0.18, "end": 0.42 }
  ],
  "languageCode": "en",
  "durationSeconds": 12.4,
  "creditsUsed": 7
}

Billing: 1 credit per 2 seconds of audio (~$18/hr retail).
Migration guide

Use automatebusinessnow as the voice for your AI voice agent.

If your voice-agent stack today calls a third-party voice provider directly, you can route every TTS + STT call through your abn_live_* key instead. Single bearer token, single credit balance, agent-friendly streaming, no per-vendor accounts to manage.

1. Synthesis (TTS)

# Before (direct provider)
POST https://<provider>/v1/text-to-speech/{voice_id}/stream
Headers:  xi-api-key: <provider-key>
Body:     { text, model_id: "<provider-model>", voice_settings: {...} }

# After (through automatebusinessnow)
POST https://automatebusiness.com/api/v1/voice/synthesize
Headers:  Authorization: Bearer abn_live_xxx
Body:     { text, voice: "warm-female", format: "mp3", model: "fast" }

Pass either a catalog key (warm-female, deep-male, etc.) or your existing 20-char raw voice id — both work. The response stream is byte-identical audio/mpeg or audio/L16 (PCM 16kHz). No buffering on our end; we add ~5–15ms over a direct provider call.

2. Transcription (STT)

# Before
POST https://<provider>/v1/speech-to-text
Headers:  xi-api-key: <provider-key>
Form:     file=<bytes>, model_id="...", timestamps_granularity=word

# After
POST https://automatebusiness.com/api/v1/voice/transcribe
Headers:  Authorization: Bearer abn_live_xxx
Form:     audio=<bytes>     # field name is "audio", not "file"

Response keys are camelCase + wrapped in { ok: true, ... }: audio_duration durationSeconds, language_code languageCode.

3. Auth + billing

  • ─ Generate an abn_live_* key at /app/api-keys. One key for both endpoints.
  • ─ Keep a credit balance — TTS bills per character, STT bills per second. Credits never expire when bought as top-ups; failed jobs auto-refund.
  • ─ Per-key burn detection auto-revokes the key if a runaway loop drains credits unusually fast. Other keys stay live.
  • ─ Rate limit: 60 TTS calls/min, 20 STT calls/min by default per key. Tier upgrades scale these.
  • ─ Hardcoded voice settings (stability, similarity_boost, style) on synth. Custom per-call settings + WebSocket input-streaming are not exposed in v1 — open an issue if you need them.
POST/v1/audio

Text-to-music. Useful for jingles, openers, ads.

Request
{
  "prompt": "warm acoustic 30-second cafe loop",
  "duration": 30
}
Response
{
  "ok": true,
  "outputUrl": "https://...mp3",
  "creditsUsed": 90,
  "balance": 17867
}
POST/v1/upscale

Upscale an image to 2k or 4k.

Request
{
  "imageUrl": "https://your-bucket/source.jpg",
  "scale": "4x"
}
Response
{
  "ok": true,
  "outputUrl": "https://...png",
  "creditsUsed": 12,
  "balance": 17855
}
GET/v1/models/list

List every model in the catalog with its credit cost.

Request
(no body)
Response
{
  "ok": true,
  "models": [
    { "id": "google/nano-banana-pro/text-to-image", "type": "text-to-image", "credits": 43 },
    { "id": "openai/gpt-image-2/text-to-image", "type": "text-to-image", "credits": 18 },
    ...
  ]
}
POST/v1/models/run

Run any model from the catalog by id, with the model's own input schema.

Request
{
  "modelId": "openai/gpt-image-2/text-to-image",
  "params": {
    "prompt": "A pixel-art mushroom",
    "aspect_ratio": "1:1",
    "quality": "medium",
    "resolution": "1k"
  }
}
Response
{
  "ok": true,
  "outputUrl": "https://...png",
  "creditsUsed": 18,
  "balance": 17837
}
POST/v1/agents/{id}/invoke

Invoke a configured autonomous agent on demand. The agent runs with its memory + connections, may queue work.

Request
{
  "input": "Process new leads in HubSpot from today"
}
Response
{
  "ok": true,
  "runId": "run_3a8b...",
  "status": "queued"
}
GET/v1/credits

Current credit balance for the key's owner.

Request
(no body)
Response
{
  "ok": true,
  "balance": 18121
}
GET/v1/status

Public health check. No auth required.

Request
(no body)
Response
{
  "ok": true,
  "service": "automatebusinessnow",
  "version": "v1",
  "timestamp": "2026-04-25T00:00:00.000Z"
}
Section

Rate limits

Every endpoint has a per-key rate limit. The cap scales with your plan tier — Power users get 10× the Free baseline. When you exceed it, the response is 429 Rate limit exceeded and your credits are not charged.

EndpointFree / StarterPro / ScalePower
/v1/chat30 / 60120 / 180300 rpm
/v1/images10 / 2040 / 60100 rpm
/v1/videos5 / 1020 / 3050 rpm
/v1/voice20 / 4080 / 120200 rpm
/v1/models/run20 / 4080 / 120200 rpm
/v1/agents/*5 / 1020 / 3060 rpm
Section

Errors

Every error is shaped:

{
  "ok": false,
  "error": "human-readable sentence"
}
StatusMeaningWhat to do
400Invalid request bodyCheck the JSON shape against the docs above
401Missing / bad / revoked keyGenerate a new one at /app/api-keys
402Insufficient creditsTop up at /app/credits — credits never expire
404Unknown employee or model idGET /v1/models/list to see what's live
429Rate limit exceededBackoff and retry, or upgrade your tier
500Upstream model failedCredits are auto-refunded; safe to retry
Section

SDKs & MCP

We don't ship a vendor SDK — every endpoint is plain HTTPS JSON, so any HTTP library works. We do publish two integration surfaces for AI tools:

  • OpenAPI 3.1 spec at /api/v1/openapi— feed it to ChatGPT custom GPTs, Postman, or any tool-calling agent.
  • MCP server config for Claude Desktop, Cursor, and other MCP-aware clients. Drop the snippet into your mcp.json and your AI assistant can call us directly. See /developers for the full config.