x-api-key header or a logged-in session — making every tool embeddable and usable from your own server.x-api-key request header. Regenerating a key immediately invalidates the previous one.audio/wav so they can be saved or streamed directly.Pass your workspace API key in the x-api-key header on every request. Keys are generated per workspace from the panel above.
All workspace-scoped CRUD routes (characters, apps, stories, NFTs, bots, media, scenes) accept either method. Use API key from external servers, automation scripts, or embedded tools. Use session cookies when calling from the FAE frontend.
x-api-key header and a session cookie. Endpoints labeled are public-embed routes. Endpoints labeled require a logged-in user (TTS, tokens).All errors return a JSON object with an error field describing the problem.
| Code | Meaning | Common Cause |
|---|---|---|
| 200 OK | Success | Request completed normally |
| 201 Created | Resource created | POST returned new resource |
| 400 Bad Request | Validation failed | Missing or invalid fields |
| 401 Unauthorized | Not logged in | Session expired or missing |
| 403 Forbidden | Invalid API key or no access | Wrong key, wrong workspace, or insufficient permissions |
| 404 Not Found | Resource missing | Bad ID or deleted resource |
| 409 Conflict | Result still processing | Generated audio is still being stored |
| 429 Rate Limited | Too many requests | Wait for the Retry-After interval |
| 500 Server Error | Internal error | Unexpected server-side failure |
| 503 Unavailable | Service offline | Stripe not configured, no AI agents online |
Returns all NFTs in the workspace where public: true. Pass your API key in the x-api-key header.
| Name | Type | Required | Description |
|---|---|---|---|
| workspace | string | required | Your workspace ID (24-char hex) |
| Name | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | required | Your workspace API key |
Returns public product details for embedding in a checkout widget. Pass your API key as x-api-key header or ?key= query param.
| Name | Type | Required | Description |
|---|---|---|---|
| productId | string | required | The product's ObjectId |
Creates a Stripe Checkout session for a product. Returns a url to redirect the customer to. Pass API key in x-api-key header.
| Name | Type | Required | Description |
|---|---|---|---|
| productId | string | required | ID of an active payment product |
| successUrl | string | required | Redirect URL after successful payment (https) |
| cancelUrl | string | required | Redirect URL if customer cancels (https) |
| customerEmail | string | optional | Pre-fill customer email in checkout |
| ref | string | optional | Custom reference string saved with the order |
| Name | Type | Required | Description |
|---|---|---|---|
| workspace | string | optional | Filter by workspace ID |
| collection | string | optional | Filter by collection ID |
| Name | Type | Required | Description |
|---|---|---|---|
| workspace | string | required | Workspace ID |
| name | string | required | NFT name |
| nftKind | string | optional | master, edition, or collection |
| public | boolean | optional | Visible in public API (default: false) |
| mintCount | number | optional | For edition kind — bulk mint count |
Update any fields on an existing NFT. Send only the fields to change.
Permanently deletes an NFT record. Returns {"success":true}.
x-api-key, private memory is omitted from list results, and supplied workspace IDs cannot be used to cross tenant boundaries. Logged-in site callers may continue using the compatible /api/characters routes with a workspace ID.Returns all characters for the workspace. Results are cached server-side (60s) and refreshed in the background — first call may be slower.
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | Character name |
| traits | string[] | optional | Personality trait list |
| background | string | optional | Character backstory |
| ollamaModel | string | optional | Default Ollama model for AI responses |
Uses the current authenticated Ollama provider network. Chat credits are reserved before dispatch, settled using actual response tokens, and refunded on provider failure or timeout. The response includes token usage, usage.credits_charged, and X-Credits-Charged.
Requires at least one connected desktop provider with Ollama ready. Requests are limited to 8,000 input characters and 4,096 requested response tokens.
| Name | Type | Required | Description |
|---|---|---|---|
| text | string | required | User message |
| model | string | optional | Override Ollama model |
| max_tokens | integer | optional | Maximum response tokens, 1-4096; default 512 |
Updates supported fields only; workspace and internal metadata cannot be overwritten.
Deletes only a character belonging to the API key's workspace and invalidates that workspace's cache.
/chat message:… command and reconnects automatically after a normal server or Docker restart. It uses only Discord's standard Guilds intent, so the privileged Message Content intent is not needed. Replies use the Character API persona and normal metered chat credits.Validates the token with Discord, registers /chat, encrypts the token, and starts the Gateway connection. Repeating this request for the same character replaces its configuration and token.
| Name | Type | Required | Description |
|---|---|---|---|
| workspace | string | session only | Workspace ID; inferred and constrained when using x-api-key |
| characterId | string | required | A character owned by the authenticated workspace |
| token | string | required | Discord bot token; write-only and encrypted immediately |
| maxTokens | integer | optional | 1–4096; default 512 |
| allowedGuildIds | string[] | optional | Optional Discord server allowlist; empty allows every server that installs the bot |
Returns identity, status, generated invite URL, response count, restrictions, and runtime state. The token and its fingerprint are always omitted.
Accepts maxTokens, allowedGuildIds, and an optional replacement token. A replacement token must belong to the same Discord application.
Starts the encrypted saved connection. Enabled bots also start automatically when the FAE backend starts.
Stops reconnects without deleting the saved encrypted configuration.
Stops the process and deletes FAE's encrypted credential. It does not delete the application in Discord.
Returns all apps in the workspace.
Returns all available app starter templates.
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | App name (auto-generates slug) |
| workspace | string | required | Workspace ID |
| templateId | string | optional | Starter template ID |
| githubRepo | string | optional | GitHub repo URL to link |
| domain | string | optional | Custom domain (default: slug.faeframeworks.com) |
Returns list of file paths in Google Cloud Storage for this app.
Multipart form upload. Sends a file to GCS under the app's prefix.
| Name | Type | Required | Description |
|---|---|---|---|
| file | File | required | The file binary |
| filename | string | optional | Override destination filename |
Returns all stories in the workspace.
Returns a single story by ID.
Creates a new story. Pass all story fields in the request body.
Updates the story. Auto-sets updatedAt.
Permanently deletes a story.
Returns bots for the workspace (nodes/edges/logs are excluded from list response).
Returns full bot including pipeline nodes and edges.
Creates a new bot. Pass name, workspace, and pipeline config in body.
Starts the bot pipeline. Returns immediately with {"status":"running"}; pipeline runs async.
Sets bot status to idle.
Returns {"logs":[...],"status":"idle|running|error"} for the bot.
Clears all run log entries for the bot.
Permanently deletes the bot and all its data.
{type} with one of: images, videos, audios, documents, models.Returns all files of the given type in the workspace, sorted newest first.
Creates a file record after you've uploaded the binary to GCS directly. The caller must be a workspace editor.
| Name | Type | Required | Description |
|---|---|---|---|
| workspace | string | required | Workspace ID |
| url | string | required | GCS public URL |
| name | string | optional | Display name |
| size | number | optional | File size in bytes |
| mimeType | string | optional | MIME type |
Update metadata fields for a file record (e.g. rename). Caller must be a workspace editor.
Deletes the DB record and removes the file from GCS. Returns {"success":true,"freed":<bytes>}.
Streams the GLB binary from GCS through the FAE server (bypasses browser CORS restrictions for the 3D viewer).
x-api-key. Use Idempotency-Key when creating images so a network retry cannot create the same job twice. Complete schema: OpenAPI 3.1 JSON.| Service | Credits | Approx. purchased-credit cost |
|---|---|---|
| Chat | 0.10 / 1K tokens; 0.05 minimum | $0.005 / 1K tokens |
| Kokoro speech | 0.50 / 1K characters; 0.10 minimum | $0.025 / 1K characters |
| Chatterbox cloning | 0.80 / 1K characters; 0.20 minimum | $0.04 / 1K characters |
| Fooocus image | 0.15 / 0.35 / 0.65 per output MP | $0.0075 / $0.0175 / $0.0325 for Lightning / Speed / Quality |
| Image input | +0.10 per input MP | +$0.005 per input MP |
402 insufficient_credits when a reservation cannot be funded. Audio responses include X-Credits-Charged; chat and image JSON include their settled charge.Returns the live configurable rates used by the server and the purchased-credit USD value.
Returns total, monthly, and permanent purchased credits for the API key's workspace. Generation routes return 402 insufficient_credits when funds are unavailable.
Lists reserved, settled, and refunded API usage with service, resource ID, charged credits, and calculation metadata.
Lists chat, image, speech, and voice-cloning capabilities with their current ready-node counts.
Accepts 1–50 system, user, and assistant messages, up to 32,000 total characters. Responses use the familiar chat.completion, choices, and usage structure. Streaming is not currently supported.
| Name | Type | Required | Description |
|---|---|---|---|
| messages | array | required | Conversation messages with role and content |
| model | string | optional | fae-text selects the provider's available Ollama model; a specific Ollama model name may also be requested |
| max_tokens | integer | optional | 1–4096; default 512 |
Lists the built-in Kokoro voice IDs, labels, current availability, and ready-node count.
OpenAI-style text-to-speech endpoint returning audio/wav bytes. The generation ID is returned in X-Generation-Id.
| Name | Type | Required | Description |
|---|---|---|---|
| input | string | required | Text to synthesize, up to 2,000 characters |
| voice | string | optional | A voice ID from /v1/audio/voices; default af_heart |
| speed | number | optional | 0.5 to 2.0; default 1.0 |
| response_format | string | optional | Currently wav |
Returns whether any Fooocus provider is ready and the number of ready nodes.
Returns 202 with a persistent job by default. Set wait:true to wait up to wait_timeout seconds for a completed 200 response. Jobs remain queued safely when no provider is ready.
| Name | Type | Required | Description |
|---|---|---|---|
| prompt | string | required | Generation prompt, up to 4,000 characters |
| negative_prompt | string | optional | Elements to avoid |
| size | string | optional | For example 1024x1024 or 1344x768; dimensions must be multiples of 64 |
| n | integer | optional | 1–4 images |
| performance | string | optional | Lightning, Speed, or Quality |
| styles | array | optional | Up to five Fooocus style names |
| loras | array | optional | Up to five {name, weight} objects |
| seed | integer | optional | -1 for random |
| output_format | string | optional | webp, png, or jpeg |
| response_format | string | optional | url (one-hour signed URL plus authenticated proxy) or b64_json |
| input_image | data URL | optional | PNG/JPEG/WebP up to 10 MB for image-to-image generation |
Lists only the image jobs created by this workspace API key. Base64 image bodies are omitted from list responses; fetch the individual generation to retrieve them.
Returns queued, processing, completed, or failed, plus result data when ready.
Streams image bytes through a tenant-checked proxy. Continue sending x-api-key.
Removes the workspace-owned job and its generated GCS objects. A currently processing job returns 409 and can be deleted after completion.
X-RateLimit-Remaining, preserve X-Request-Id in support logs, and honor Retry-After after a 429.Returns TTS availability and available voices. No auth required.
Returns audio/wav binary. Routed through AI relay to Electron. Persists a TTSJob record.
| Name | Type | Required | Description |
|---|---|---|---|
| text | string | required | Text to synthesize (max 2000 chars) |
| voice | string | optional | Voice ID (default: af_heart) |
| speed | number | optional | Speed multiplier 0.5–2.0 (default: 1.0) |
| workspaceId | string | required | Workspace charged for the generation |
voice_id.x-api-key (xi-api-key is also accepted). Saved voices and generations are isolated to the key's workspace. Machine-readable schema: OpenAPI 3.1 JSON.Returns available, state (offline, loading, or ready), and ready_nodes.
Send multipart/form-data. WAV, MP3, OGG, FLAC, and M4A clips up to 10 MB are accepted. The response includes a reusable voice_id.
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | Display name, up to 100 characters |
| audio | file | required | Reference clip; files is accepted as an alias |
| description | string | optional | Voice description |
| labels | JSON | optional | String key/value metadata |
| exaggeration | number | optional | Default expressiveness, 0–1 |
| cfg_weight | number | optional | Default reference adherence, 0–1 |
| turbo | boolean | optional | Use the faster Turbo model by default |
Returns {"voices": [...], "has_more": false} for the key's workspace.
Returns voice metadata and default generation settings.
Deletes the saved reference clip. Existing generation history remains available.
Send JSON and receive raw audio/wav. The X-Generation-Id header identifies the persisted result. Text is limited to 2,000 characters.
Default rate limit: 20 generations per workspace per minute. Read X-RateLimit-Remaining and honor Retry-After after a 429.
Lists this workspace's generations, newest first. Maximum page size is 100.
Returns status, voice ID, timestamps, text, and stored audio URL.
Streams the stored WAV. A 409 means storage is still completing; retry shortly.
Returns all scenes for the workspace.
Creates a new scene. Pass scene definition fields in the body.
Updates an existing scene record.
Permanently deletes the scene.
Returns all token entries.
Registers a new token record.
| Name | Type | Required | Description |
|---|---|---|---|
| tokenAddress | string | required | On-chain token contract address |
| chain | string | required | e.g. solana |