# automatebusinessnow - full reference for AI agents > One bearer token. Every ABN employee, every ABN workflow, every autonomous agent. One credit balance. This document is the verbose companion to /llms.txt. Read /llms.txt first for a 60-second overview, this one for full integration detail. ## How to use an ABN key correctly Call ABN service endpoints with documented intent fields. Example: POST /images with { "prompt": "...", "aspectRatio": "1:1", "quality": "high", "style": "..." }. Keep root abn_* keys on your backend. For browser or mobile apps, mint a short-lived, origin-locked abnct_* token from /tokens/mint. Do not invent routing fields. modelId, provider, and vendorApiKey are not part of the standard app API. Platform rules: https://automatebusinessnow.com/aup. ---------------------------------------------------------------------------- 1. AUTHENTICATION ---------------------------------------------------------------------------- Every /api/v1 call (except /status) requires: Authorization: Bearer abn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Get a key at https://automatebusinessnow.com/app/api-keys Keys are revocable. A single key burning >= 100,000 credits in 60 seconds auto-revokes and emails the owner ($1,000/min sustained - sits comfortably above the most expensive single call). Manual revocation also available. For programmatic device-style auth (CLIs, IDE extensions), use: POST /api/v1/auth/device/init -> returns device_code + user_code POST /api/v1/auth/device/poll -> poll until user grants access in browser ---------------------------------------------------------------------------- 2. RATE LIMITS ---------------------------------------------------------------------------- Per-key, per-tier. Free tier baselines (multiplied by tier on Power/Premier): /chat 30 req/min /images 30 req/min /voice/* 30 req/min /agents/*/invoke 5 req/min /mcp 120 req/min (entry-point - inner tools have their own caps) Exceeding returns HTTP 429 with Retry-After: 60. ---------------------------------------------------------------------------- 3. CREDITS ---------------------------------------------------------------------------- Every call deducts credits from one balance. Free signup grants 200 credits. GET https://automatebusinessnow.com/api/v1/credits -> { "ok": true, "balance": 12345 } Failed jobs auto-refund. Successful responses include creditsUsed + balance. ---------------------------------------------------------------------------- 4. ENDPOINTS - FULL REFERENCE ---------------------------------------------------------------------------- Base: https://automatebusinessnow.com/api/v1 ----- POST /chat ----- Body: { "employeeSlug": "copywriter" | "business-consultant" | "customer-service" | ..., "prompt": "...", "imageUrl": "https://..." (optional, for vision-capable employees), "fileContext": "..." (optional plain-text context), "latencyProfile": "standard" | "website_chat" (default "standard"), "responseFormat": "markdown" | "plain_text" (default "markdown"; website_chat defaults to "plain_text"), "stream": true | false (default false) } Response 200: { "ok": true, "employeeSlug": "...", "kind": "text" | "image" | "mixed", "message": "..." | null, "imageUrl": "..." | null, "executionClass": "ai" | "media" | "ai+media", "latencyProfile": "standard" | "website_chat", "responseFormat": "markdown" | "plain_text", "requestId": "req_...", "latencyMs": , "creditsUsed": , "balance": } Errors: 400 (invalid JSON, missing prompt), 401, 402 (insufficient credits), 404 (unknown employee), 429, 500. Notes: - Use GET /employees to discover valid employeeSlug values. - Use latencyProfile="website_chat", responseFormat="plain_text", and stream=true for customer-facing website chat widgets. - Send X-Request-ID to make ABN echo your trace id as requestId and X-ABN-Request-ID. ABN generates a req_* id if omitted. - Set stream=true or send Accept: text/event-stream for SSE events: start, text, optional stage/image, done, or error. - /code/chat also streams SSE for coding; /voice/synthesize streams audio bytes. ----- GET /employees ----- Response 200: { "ok": true, "employees": [ { "slug": "copywriter", "name": "Copywriter", "scopeRequired": "employee:copywriter", "accessible": true, "responseFormats": ["markdown", "plain_text"] } ] } ----- POST /images ----- Body: { "prompt": "...", "aspectRatio": "1:1", "quality": "low|medium|high", "style": "..." } Response 200: { "ok": true, "outputUrl": "...", "creditsUsed": ..., "balance": ... } Note: pass intent fields (prompt, aspectRatio, quality, style). ABN service endpoints accept documented fields only. Do not include modelId, provider, or vendorApiKey. ----- POST /voice/synthesize ----- Body: { "text": "..." (max 5000 chars), "voice": "warm-female|deep-male|energetic-female|british-male|young-female|podcast-host" — ABN catalog presets., "format": "mp3|pcm_16000", "model": "fast|quality" } Response 200: STREAMS RAW AUDIO BYTES. Headers: X-Credits-Used, X-Voice-Format, Content-Type matches format. Billing: 1 credit / 50 chars (model: fast), 1 credit / 25 chars (model: quality). Errors: 400, 401, 402, 429, 502 (provider error), 503 (not enabled). ----- POST /voice/transcribe ----- multipart/form-data: audio - file (mp3|wav|m4a|ogg|webm, <= 25 MB, <= 60 min) language (optional BCP-47 tag) diarize (optional "true" -> speaker labels) Response 200: { "ok": true, "text": "...", "words": [{ "word": "...", "start": , "end": , "speaker": "S1" | null }], "languageCode": "en" | null, "durationSeconds": , "creditsUsed": } Billing: 1 credit / 2 seconds of audio. ----- GET /jobs/{jobId} ----- Response 200 (running): { "ok": true, "status": "running", ... } Response 200 (completed): { "ok": true, "status": "completed", "outputUrl": "...", "creditsUsed": , "balance": , "completedAt": "ISO-8601" } Response 200 (failed): { "ok": false, "status": "failed", "error": "...", "creditsUsed": 0 } (auto-refunded) Response 404: job not found, or owned by a different key. ----- POST /agents/{id}/invoke ----- Invoke a Tier-2 autonomous agent the caller owns. Body: { "input": "..." (optional extra input) } Response: { "ok": true, "runId": "...", "creditsUsed": , "summary": "..." | undefined } Errors: 401, 404 (not found / not owned), 429, 500. ----- POST /tokens/mint ----- Mint a short-lived `abnct_*` browser/mobile token from a parent abn_* key. Auth: Bearer abn_* MUST hold scope `tokens:mint`. Session callers cannot mint. Body: { "end_user_id": "" (required, max 200 chars), "scopes": ["employee:copywriter", "image:generate", ...] (subset of parent), "allowed_origins": ["https://app.yourcompany.com"] (required, http(s) absolute), "ttl_seconds": <60..86400, default 900> } Response 200: { "ok": true, "token": "abnct_<64-hex>", // RETURNED ONCE - capture it "token_id": "", "expires_at": "", "scopes": [...], "allowed_origins": [...], "end_user_id": "..." } Errors: 400 (validation / scope-not-in-parent / origin-not-in-parent), 401 (bad parent bearer), 403 (parent lacks tokens:mint). The frontend then calls /api/v1/* with: Authorization: Bearer abnct_<64-hex> The browser MUST send Origin: - missing/mismatched -> 401. ----- POST /tokens/revoke ----- Body: { "token_id": "", "reason": "..." (optional) } Response 200: { "ok": true } Errors: 404 (not found / already revoked). ----- GET /tokens/list ----- Query: ?parent_key_id=&end_user_id=&limit=<1..200, default 50> Response 200: { "ok": true, "tokens": [{ id, parent_key_id, end_user_id, scopes, allowed_origins, expires_at, revoked_at, created_at, last_used_at, token_prefix }] } Plain-text tokens NEVER returned. Mint is the only place they appear. ----- GET /credits ----- Response 200: { "ok": true, "balance": } ----- GET /status ----- PUBLIC. No auth required. Response 200: { "ok": true, "service": "automatebusinessnow", "version": "...", "timestamp": "ISO-8601" } ---------------------------------------------------------------------------- 5. MCP SERVER ---------------------------------------------------------------------------- URL: https://automatebusinessnow.com/api/v1/mcp Transport: Streamable HTTP, stateless, JSON-response mode. Auth: same bearer as REST. Tools surfaced via MCP for default ABN-capability keys (6): chat, image_generate, voice_synthesize, jobs_status, credits_get, agent_invoke. Each tool delegates to the matching REST endpoint above - same credit cost, same rate limits, same error contracts. mcp.json snippet: { "mcpServers": { "abn": { "url": "https://automatebusinessnow.com/api/v1/mcp", "headers": { "Authorization": "Bearer abn_YOUR_KEY_HERE" } } } } ---------------------------------------------------------------------------- 6. RESPONSE & ERROR CONTRACTS ---------------------------------------------------------------------------- Successful JSON responses always include "ok": true. Failures always include "ok": false plus "error": "human-readable message". Status codes: 200 success 202 async submit accepted 400 bad request (invalid JSON / missing field / value out of range) 401 missing / bad / revoked key 402 insufficient credits -> response includes "estimate" + "balance" 404 not found / unknown id 429 rate limit -> header Retry-After: 60 500 internal error 502 upstream provider error (transient) 503 capability not enabled on this server ---------------------------------------------------------------------------- 7. SUPPORT ---------------------------------------------------------------------------- hello@automatebusinessnow.com - real human, replies within 1 business day. GitHub issues: https://github.com/tengoqueaprender/abn/issues Status page: https://automatebusinessnow.com/api/v1/status (also CDN-cached at /status if your client expects it).