{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"BrainDaemon API","version":"1.0.0","summary":"OpenAI-compatible chat completions for Daemon Core, Prime and Omega.","description":"The BrainDaemon API speaks the OpenAI Chat Completions format. Set the base URL to https://api.braindaemon.com/v1 and send your key as `Authorization: Bearer bd_live_…`. Calls use the same credits as the website. User messages may carry pictures (image_url parts): BrainDaemon reads each picture and every daemon answers about it. It also speaks the Messages format (POST /v1/messages) for Claude Code and the Claude SDKs, and the OpenAI images format (POST /v1/images/generations, /v1/images/edits and /v1/images/variations; keys need the images scope). Videos from a prompt or a picture: POST /v1/videos/generations answers 202 with a job id and the price; GET /v1/videos/generations/{id} fetches the video (keys need the videos scope). Guides: https://braindaemon.com/docs/api","contact":{"name":"BrainDaemon","url":"https://braindaemon.com/docs/api"}},"servers":[{"url":"https://api.braindaemon.com","description":"Production"}],"tags":[{"name":"Chat","description":"Chat completions, streamed or not; user messages may carry pictures."},{"name":"Models","description":"The daemons you can call."},{"name":"Account","description":"Your key, limits and credits."},{"name":"Skills","description":"The skill categories for the skills request field."},{"name":"Messages","description":"The Messages format, for Claude Code and the Claude SDKs (same daemons, credits and limits)."},{"name":"Images","description":"Pictures from a prompt, edits and variations of your pictures (keys need the images scope; charged per picture made)."},{"name":"Videos","description":"Videos from a prompt or a picture (keys need the videos scope; charged once per video made, never for a failed, refused or canceled one)."},{"name":"Meta","description":"Health and this document."}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"paths":{"/health":{"get":{"operationId":"health","summary":"Liveness check.","tags":["Meta"],"x-braindaemon-scope":"none","security":[],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},"examples":{"default":{"value":{"ok":true}}}}}}}}},"/v1/openapi.json":{"get":{"operationId":"getOpenApiDocument","summary":"This API's OpenAPI 3.1 document.","tags":["Meta"],"x-braindaemon-scope":"none","security":[],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}},"/v1/models":{"get":{"operationId":"listModels","summary":"List the daemons you can call.","tags":["Models"],"x-braindaemon-scope":"models","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"},"examples":{"default":{"value":{"object":"list","data":[{"id":"daemon-core","object":"model","created":1760832000,"owned_by":"braindaemon","context_length":200000,"max_output_tokens":200000,"overclock_available":true,"overclock_multiplier":6},{"id":"daemon-prime","object":"model","created":1760832000,"owned_by":"braindaemon","context_length":256000,"max_output_tokens":256000,"overclock_available":true,"overclock_multiplier":3},{"id":"daemon-omega","object":"model","created":1760832000,"owned_by":"braindaemon","context_length":256000,"max_output_tokens":32768,"overclock_available":true,"overclock_multiplier":3}]}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/models/{id}":{"get":{"operationId":"retrieveModel","summary":"Get one daemon by id or alias.","tags":["Models"],"x-braindaemon-scope":"models","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"A model id or alias, for example daemon-core.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"},"examples":{"default":{"value":{"id":"daemon-core","object":"model","created":1760832000,"owned_by":"braindaemon","context_length":200000,"max_output_tokens":200000,"overclock_available":true,"overclock_multiplier":6}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/me":{"get":{"operationId":"getMe","summary":"The calling key, its limits and today's spend.","tags":["Account"],"x-braindaemon-scope":"any","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"},"examples":{"default":{"value":{"object":"api_key","key":{"id":"4f1c2a9e-8b7d-4c3a-9e21-7d5b6a0c1f88","name":"Production server","prefix":"bd_live_7Hk2","scopes":["chat","models"],"status":"active","created":1760900000,"expires_at":null,"last_used_at":1760990000},"limits":{"requests_per_minute":60,"max_concurrent":10,"daily_credit_cap":300,"allowed_ips":[]},"usage":{"credits_spent_today":12.4,"credits_remaining":2875.5,"period_end":1763424000,"daily_cap_remaining":287.6,"daily_cap_resets_at":1761004800,"account_daily_cap_remaining":null,"spendable_now":287.6},"balance":{"plan_credits_left":2500,"one_time_credits":400,"held_by_running_requests":24.5,"total":2875.5},"overclock":{"available":true,"daemons":{"daemon-core":{"available":true,"multiplier":6},"daemon-prime":{"available":true,"multiplier":3},"daemon-omega":{"available":true,"multiplier":3}}}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create a chat completion, streamed or not.","tags":["Chat"],"x-braindaemon-scope":"chat","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"},"examples":{"simple":{"value":{"model":"daemon-core","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"Say hello in one short sentence."}]}},"streaming":{"value":{"model":"daemon-core","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"Say hello in one short sentence."}],"stream":true,"stream_options":{"include_usage":true}}},"reportAnalysis":{"value":{"model":"daemon-prime","messages":[{"role":"system","content":"You analyse business reports. Answer only with the JSON object the schema describes."},{"role":"user","content":"Q3 2026 operations report for Northwind Logistics. Revenue rose 12% to 4.1M EUR, driven by new e-commerce clients. On-time delivery fell from 96% to 91% after the Leipzig warehouse move. Two senior dispatchers left and hiring is in progress. Fuel costs were 8% over budget. A new customer portal launched in August and cut support tickets by 30%. Management expects Q4 revenue of 4.4M EUR if delivery times recover."}],"response_format":{"type":"json_schema","json_schema":{"name":"report_analysis","description":"Summary, key findings, risks and a 0 to 100 health score for a business report.","strict":true,"schema":{"type":"object","properties":{"summary":{"type":"string","description":"Two or three sentences."},"key_findings":{"type":"array","items":{"type":"string"},"description":"The most important facts, one per item."},"risks":{"type":"array","items":{"type":"string"},"description":"Risks or open problems, one per item."},"score":{"type":"integer","minimum":0,"maximum":100,"description":"Overall health from 0 (bad) to 100 (excellent)."}},"required":["summary","key_findings","risks","score"],"additionalProperties":false}}},"reasoning_effort":"none","max_tokens":4000}},"toolCalling":{"value":{"model":"daemon-prime","messages":[{"role":"user","content":"Where is order A-1042?"}],"tools":[{"type":"function","function":{"name":"get_order_status","description":"Look up the delivery status of an order by its id.","parameters":{"type":"object","properties":{"order_id":{"type":"string","description":"The order id, for example A-1042."}},"required":["order_id"],"additionalProperties":false}}}],"tool_choice":"auto","max_tokens":4000}},"skills":{"value":{"model":"daemon-core","skills":{"categories":["frontend"],"max":1},"messages":[{"role":"system","content":"You are the coding assistant of Example Studio."},{"role":"user","content":"Build a landing page for a coffee shop with a hero, a menu and a contact form."}]}},"vision":{"value":{"model":"daemon-core","messages":[{"role":"user","content":[{"type":"text","text":"Write one detailed prompt for an image generator that recreates this picture as closely as possible: subject, composition, camera, lighting, colours and style. Answer with the prompt only."},{"type":"image_url","image_url":{"url":"https://example.com/fox-in-snow.jpg","detail":"auto"}}]}]}}}}}},"responses":{"200":{"description":"The completion. With `stream: true` the body is a server-sent event stream of chunks that ends with `data: [DONE]`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"},"examples":{"simple":{"value":{"id":"chatcmpl-Ex4mple0000000000000001","object":"chat.completion","created":1760900000,"model":"daemon-core","choices":[{"index":0,"message":{"role":"assistant","content":"Hello, nice to meet you!","refusal":null},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":24,"completion_tokens":8,"total_tokens":32,"credits":0.03,"overclock":false}}},"reportAnalysis":{"value":{"id":"chatcmpl-Ex4mple0000000000000002","object":"chat.completion","created":1760900000,"model":"daemon-prime","choices":[{"index":0,"message":{"role":"assistant","content":"{\"summary\":\"Revenue grew 12% to 4.1M EUR, but on-time delivery dropped to 91% after the warehouse move and fuel costs ran 8% over budget.\",\"key_findings\":[\"Revenue rose 12% to 4.1M EUR thanks to new e-commerce clients\",\"On-time delivery fell from 96% to 91% after the Leipzig move\",\"The customer portal cut support tickets by 30%\"],\"risks\":[\"Delivery delays may cost the new e-commerce clients\",\"Fuel costs are 8% over budget\",\"Two senior dispatchers left\"],\"score\":68}","refusal":null},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":412,"completion_tokens":118,"total_tokens":530,"credits":1.33,"overclock":false}}},"toolCalling":{"value":{"id":"chatcmpl-Ex4mple0000000000000003","object":"chat.completion","created":1760900000,"model":"daemon-prime","choices":[{"index":0,"message":{"role":"assistant","content":null,"refusal":null,"tool_calls":[{"id":"call_Ex4mple01","type":"function","function":{"name":"get_order_status","arguments":"{\"order_id\":\"A-1042\"}"}}]},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":96,"completion_tokens":21,"total_tokens":117,"credits":0.29,"overclock":false}}},"skills":{"value":{"id":"chatcmpl-SKILLSEXAMPLE0000000000000","object":"chat.completion","created":1760900000,"model":"daemon-core","skills_used":[{"id":"example-studio/web-skills/landing-page-builder","version":"sha256:3f9a1c0b7d2e","name":"landing-page-builder","title":"Landing Page Builder","category":"frontend","description":"Plan and build a responsive landing page: hero, sections, call to action and accessible forms."}],"choices":[{"index":0,"message":{"role":"assistant","content":"Here is a plan and the code for the landing page. 1. Hero with the shop name and an Order button...","refusal":null},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":2310,"completion_tokens":900,"total_tokens":3210,"credits":3.21,"overclock":false,"skills":{"decided":"picked","cached":false,"credits":0}}}},"vision":{"value":{"id":"chatcmpl-Ex4mple0000000000000005","object":"chat.completion","created":1760900000,"model":"daemon-core","choices":[{"index":0,"message":{"role":"assistant","content":"A red fox sitting in fresh snow at the edge of a pine forest, head turned toward the camera, eye-level telephoto shot with a shallow depth of field, soft golden morning light from the left, white and amber palette with deep green background blur, crisp natural-history wildlife photography, calm mood.","refusal":null},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":486,"completion_tokens":71,"total_tokens":557,"credits":6.56,"overclock":false,"images":1,"image_credits":6}}}}},"text/event-stream":{"schema":{"type":"string","description":"Lines `data: <ChatCompletionChunk JSON>`, then `data: [DONE]`.","x-braindaemon-event-schema":{"$ref":"#/components/schemas/ChatCompletionChunk"}},"example":"data: {\"id\":\"chatcmpl-Ex4mple0000000000000004\",\"object\":\"chat.completion.chunk\",\"created\":1760900000,\"model\":\"daemon-core\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}\n\ndata: {\"id\":\"chatcmpl-Ex4mple0000000000000004\",\"object\":\"chat.completion.chunk\",\"created\":1760900000,\"model\":\"daemon-core\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello,\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}\n\ndata: {\"id\":\"chatcmpl-Ex4mple0000000000000004\",\"object\":\"chat.completion.chunk\",\"created\":1760900000,\"model\":\"daemon-core\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" nice to meet you!\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}\n\ndata: {\"id\":\"chatcmpl-Ex4mple0000000000000004\",\"object\":\"chat.completion.chunk\",\"created\":1760900000,\"model\":\"daemon-core\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":null}\n\ndata: {\"id\":\"chatcmpl-Ex4mple0000000000000004\",\"object\":\"chat.completion.chunk\",\"created\":1760900000,\"model\":\"daemon-core\",\"choices\":[],\"usage\":{\"prompt_tokens\":24,\"completion_tokens\":8,\"total_tokens\":32,\"credits\":0.03,\"overclock\":false}}\n\ndata: [DONE]\n\n"}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_content`: A message contains image, audio or file parts. Version 1 accepts text only. `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `context_length_exceeded`: The messages (with tools and the JSON schema) are longer than the daemon accepts. The limit per daemon is maxInputTokens in GET /v1/public-api/models-info. `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"unsupported_content":{"summary":"A message contains image, audio or file parts. Version 1 accepts text only.","value":{"error":{"message":"Only text content is supported (messages[1].content[0] is an image).","type":"invalid_request_error","code":"unsupported_content","param":"messages"}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"error":{"message":"n must be 1.","type":"invalid_request_error","code":"unsupported_parameter","param":"n"}}},"context_length_exceeded":{"summary":"The messages (with tools and the JSON schema) are longer than the daemon accepts. The limit per daemon is maxInputTokens in GET /v1/public-api/models-info.","value":{"error":{"message":"This request is about 301200 tokens, but daemon-core accepts at most 256000 input tokens. Shorten the messages.","type":"invalid_request_error","code":"context_length_exceeded","param":"messages"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"402":{"description":"`insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"error":{"message":"You have no credits left in this period.","type":"insufficient_quota","code":"insufficient_quota","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet. `overclock_not_allowed`: The request set `overclock: true`, but Overclock is not available: your plan does not include it, it is switched off for the API right now, or the daemon has no faster engine.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}},"overclock_not_allowed":{"summary":"The request set `overclock: true`, but Overclock is not available: your plan does not include it, it is switched off for the API right now, or the daemon has no faster engine.","value":{"error":{"message":"Overclock is not available on your Pro plan. Send the request without overclock to run it at the normal speed and price.","type":"permission_error","code":"overclock_not_allowed","param":"overclock"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"422":{"description":"`invalid_json_output`: Structured output was requested, but the answer did not match the JSON schema after one retry, or it was cut off at max_tokens (then at once, without a retry).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_json_output":{"summary":"Structured output was requested, but the answer did not match the JSON schema after one retry, or it was cut off at max_tokens (then at once, without a retry).","value":{"error":{"message":"The answer did not match the JSON schema after a retry.","type":"invalid_request_error","code":"invalid_json_output","param":"response_format"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `web_search_limit`: The account used its web searches and page reads for today, or web search is not included in its plan. `rate_limited`: The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"error":{"message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged.","type":"rate_limit_error","code":"concurrency_limit","param":null}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"error":{"message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged.","type":"rate_limit_error","code":"capacity_busy","param":null}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"error":{"message":"This key reached its daily cap of 300 credits.","type":"rate_limit_error","code":"daily_credit_cap","param":null}}},"web_search_limit":{"summary":"The account used its web searches and page reads for today, or web search is not included in its plan.","value":{"error":{"message":"This account has used its 100 web searches and page reads for today. The limit resets at 00:00 UTC.","type":"rate_limit_error","code":"web_search_limit","param":"web_search"}}},"rate_limited":{"summary":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","value":{"error":{"message":"This API key may make 10 pictures a minute. Retry in 12 seconds.","type":"rate_limit_error","code":"rate_limited","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon. `web_search_unavailable`: Web search could not run (it is switched off right now or the search failed) and the request set web_search.required. `skills_unavailable`: Skills could not be used (switched off right now, not available on this account, the pick could not run, or the key started too many new picks this minute) and the request set skills.required.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}},"web_search_unavailable":{"summary":"Web search could not run (it is switched off right now or the search failed) and the request set web_search.required.","value":{"error":{"message":"Web search is temporarily unavailable. Send the request without web_search, or retry later.","type":"server_error","code":"web_search_unavailable","param":"web_search"}}},"skills_unavailable":{"summary":"Skills could not be used (switched off right now, not available on this account, the pick could not run, or the key started too many new picks this minute) and the request set skills.required.","value":{"error":{"message":"Skills are temporarily unavailable. Send the request without skills.required, or retry later.","type":"server_error","code":"skills_unavailable","param":"skills"}}}}}}}}}},"/v1/skills/categories":{"get":{"operationId":"listSkillCategories","summary":"List the skill categories for the skills request field, with how many skills each has.","tags":["Skills"],"x-braindaemon-scope":"models","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillCategoryList"},"examples":{"default":{"value":{"object":"list","data":[{"id":"frontend","count":412},{"id":"backend","count":388},{"id":"data","count":205}]}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/messages":{"post":{"operationId":"createMessage","summary":"Create a message in the Messages format (Claude Code, Claude SDKs), streamed or not.","tags":["Account"],"x-braindaemon-scope":"chat","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}},"responses":{"200":{"description":"The message (Messages format). With `stream: true` the body is the Messages event stream.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}},"text/event-stream":{"schema":{"type":"string","description":"With stream: true, the Messages event stream: message_start, content_block_start / content_block_delta / content_block_stop (text, thinking, tool_use with input_json_delta), message_delta (stop_reason, usage), message_stop; ping keeps the connection open; an error event ends a failed stream."},"example":"event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_A1b2C3\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"daemon-core\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":412,\"output_tokens\":1,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0}}}\n\nevent: ping\ndata: {\"type\":\"ping\"}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Let me read the file.\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":1,\"content_block\":{\"type\":\"tool_use\",\"id\":\"call_X9y8Z7\",\"name\":\"Read\",\"input\":{}}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"file_path\\\":\\\"/app/src/index.ts\\\"}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":412,\"output_tokens\":38,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"credits\":0.45}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_content`: A message contains image, audio or file parts. Version 1 accepts text only. `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `context_length_exceeded`: The messages (with tools and the JSON schema) are longer than the daemon accepts. The limit per daemon is maxInputTokens in GET /v1/public-api/models-info.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"type":"error","error":{"type":"invalid_request_error","message":"messages[0].role must be one of system, developer, user, assistant, tool."}}},"unsupported_content":{"summary":"A message contains image, audio or file parts. Version 1 accepts text only.","value":{"type":"error","error":{"type":"invalid_request_error","message":"Only text content is supported (messages[1].content[0] is an image)."}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"type":"error","error":{"type":"invalid_request_error","message":"n must be 1."}}},"context_length_exceeded":{"summary":"The messages (with tools and the JSON schema) are longer than the daemon accepts. The limit per daemon is maxInputTokens in GET /v1/public-api/models-info.","value":{"type":"error","error":{"type":"invalid_request_error","message":"This request is about 301200 tokens, but daemon-core accepts at most 256000 input tokens. Shorten the messages."}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"type":"error","error":{"type":"authentication_error","message":"Invalid API key. Create a key in Settings → API."}}}}}}},"402":{"description":"`insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"type":"error","error":{"type":"billing_error","message":"You have no credits left in this period."}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet. `overclock_not_allowed`: The request set `overclock: true`, but Overclock is not available: your plan does not include it, it is switched off for the API right now, or the daemon has no faster engine.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"type":"error","error":{"type":"permission_error","message":"API access is not enabled for this account."}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"type":"error","error":{"type":"permission_error","message":"API access needs a paid plan."}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"type":"error","error":{"type":"permission_error","message":"This key is missing the chat scope."}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"type":"error","error":{"type":"permission_error","message":"Requests from 203.0.113.7 are not allowed for this key."}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"type":"error","error":{"type":"permission_error","message":"This account is suspended."}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"type":"error","error":{"type":"permission_error","message":"This key is paused. Contact support or create a new key."}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"type":"error","error":{"type":"permission_error","message":"This daemon is not available on your account yet"}}},"overclock_not_allowed":{"summary":"The request set `overclock: true`, but Overclock is not available: your plan does not include it, it is switched off for the API right now, or the daemon has no faster engine.","value":{"type":"error","error":{"type":"permission_error","message":"Overclock is not available on your Pro plan. Send the request without overclock to run it at the normal speed and price."}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"type":"error","error":{"type":"not_found_error","message":"The model daemon-ultra does not exist."}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `web_search_limit`: The account used its web searches and page reads for today, or web search is not included in its plan.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"type":"error","error":{"type":"rate_limit_error","message":"Rate limit reached: 60 requests per minute for this key."}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"type":"error","error":{"type":"rate_limit_error","message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged."}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"type":"error","error":{"type":"rate_limit_error","message":"This key reached its daily cap of 300 credits."}}},"web_search_limit":{"summary":"The account used its web searches and page reads for today, or web search is not included in its plan.","value":{"type":"error","error":{"type":"rate_limit_error","message":"This account has used its 100 web searches and page reads for today. The limit resets at 00:00 UTC."}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"type":"error","error":{"type":"api_error","message":"Internal error. Quote the request id to support."}}}}}}},"529":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon. `web_search_unavailable`: Web search could not run (it is switched off right now or the search failed) and the request set web_search.required. `skills_unavailable`: Skills could not be used (switched off right now, not available on this account, the pick could not run, or the key started too many new picks this minute) and the request set skills.required.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"type":"error","error":{"type":"overloaded_error","message":"The BrainDaemon API is under maintenance. Retry in a minute."}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"type":"error","error":{"type":"overloaded_error","message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged."}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"type":"error","error":{"type":"overloaded_error","message":"Tool calling / structured output is temporarily unavailable for daemon-core."}}},"web_search_unavailable":{"summary":"Web search could not run (it is switched off right now or the search failed) and the request set web_search.required.","value":{"type":"error","error":{"type":"overloaded_error","message":"Web search is temporarily unavailable. Send the request without web_search, or retry later."}}},"skills_unavailable":{"summary":"Skills could not be used (switched off right now, not available on this account, the pick could not run, or the key started too many new picks this minute) and the request set skills.required.","value":{"type":"error","error":{"type":"overloaded_error","message":"Skills are temporarily unavailable. Send the request without skills.required, or retry later."}}}}}}}}}},"/v1/messages/count_tokens":{"post":{"operationId":"countMessageTokens","summary":"Count the input tokens of a Messages-format request (free; the estimate the API uses before a call).","tags":["Account"],"x-braindaemon-scope":"chat","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":128,"description":"A daemon id (daemon-core, daemon-prime, daemon-omega) or a claude-* name, which maps to a daemon (opus, sonnet, haiku: set by BrainDaemon, see the Claude Code guide)."},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":32,"description":"user, assistant, or system (a system message in the middle of the conversation; developer counts as system)."},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64}},"required":["type"],"additionalProperties":{},"description":"A content block: text, tool_use (assistant), tool_result (user), thinking / redacted_thinking (ignored on input), document with a text source. image and other documents get 400 unless the daemon reads them."}}]}},"required":["role","content"],"additionalProperties":{},"description":"One conversation turn: user, assistant or system, with a string or a list of content blocks (unknown block fields such as cache_control are ignored)."}},"max_tokens":{"type":"integer","minimum":1},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type"],"additionalProperties":{}}}],"description":"The system prompt: a string or a list of text blocks (cache_control is accepted and ignored)."},"stream":{"type":["boolean","null"]},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"top_k":{"description":"Accepted and ignored."},"stop_sequences":{"description":"A list of strings; up to 4 are applied."},"tools":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"input_schema":{"description":"A JSON Schema object for the tool input.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"description":"Custom tools only. Server tools of other providers (web search, code execution, ...) are dropped.","type":"string"}},"required":["name"],"additionalProperties":{},"description":"A tool the daemon may call."}},{"type":"null"}]},"tool_choice":{"description":"auto (default), any (must call a tool), tool (must call the named tool) or none."},"metadata":{"description":"metadata.user_id is stored hashed, for your own abuse tracking."},"thinking":{"description":"Extended thinking. enabled maps budget_tokens to the daemon's thinking depth (below 4,000: low, below 16,000: medium, else high); adaptive and disabled leave the daemon's default (output_config.effort wins when set). The thinking comes back as thinking blocks when the daemon produced any (enabled, or adaptive without display omitted)."},"output_config":{"description":"output_config.effort (low, medium, high, max) sets the daemon's thinking depth; the rest is ignored."},"overclock":{"description":"BrainDaemon extension: the same as on chat completions.","type":["boolean","null"]},"skills":{"description":"BrainDaemon extension: the same as on chat completions."},"web_search":{"description":"BrainDaemon extension: the same as on chat completions."}},"required":["model","messages"],"additionalProperties":{}}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"input_tokens":{"type":"integer"}},"required":["input_tokens"],"additionalProperties":false}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_content`: A message contains image, audio or file parts. Version 1 accepts text only.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"type":"error","error":{"type":"invalid_request_error","message":"messages[0].role must be one of system, developer, user, assistant, tool."}}},"unsupported_content":{"summary":"A message contains image, audio or file parts. Version 1 accepts text only.","value":{"type":"error","error":{"type":"invalid_request_error","message":"Only text content is supported (messages[1].content[0] is an image)."}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"type":"error","error":{"type":"authentication_error","message":"Invalid API key. Create a key in Settings → API."}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"type":"error","error":{"type":"permission_error","message":"API access is not enabled for this account."}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"type":"error","error":{"type":"permission_error","message":"API access needs a paid plan."}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"type":"error","error":{"type":"permission_error","message":"This key is missing the chat scope."}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"type":"error","error":{"type":"permission_error","message":"Requests from 203.0.113.7 are not allowed for this key."}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"type":"error","error":{"type":"permission_error","message":"This account is suspended."}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"type":"error","error":{"type":"permission_error","message":"This key is paused. Contact support or create a new key."}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"type":"error","error":{"type":"permission_error","message":"This daemon is not available on your account yet"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"type":"error","error":{"type":"not_found_error","message":"The model daemon-ultra does not exist."}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"type":"error","error":{"type":"rate_limit_error","message":"Rate limit reached: 60 requests per minute for this key."}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"type":"error","error":{"type":"api_error","message":"Internal error. Quote the request id to support."}}}}}}},"529":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesError"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"type":"error","error":{"type":"overloaded_error","message":"The BrainDaemon API is under maintenance. Retry in a minute."}}}}}}}}}},"/v1/images/generations":{"post":{"operationId":"createImage","summary":"Create pictures from a prompt (OpenAI images format), optionally in the style of your pictures (style_image), a saved style (style_id) or a named style (style, GET /v1/images/styles). Waits for them; a slow request answers 202 with a job id.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationRequest"},"examples":{"simple":{"value":{"model":"daemon-image","prompt":"A red fox reading a newspaper in a sunny cafe, watercolor","n":1,"size":"1024x1024"}},"pro":{"value":{"model":"daemon-image-pro","prompt":"A product photo of a ceramic coffee mug on a wooden table, soft morning light","n":2,"size":"1536x1024","response_format":"b64_json"}}}},"multipart/form-data":{"schema":{"type":"object","required":["image","prompt"],"properties":{"image":{"type":"array","items":{"type":"string","format":"binary"},"description":"The picture(s) to change (JPEG, PNG or WebP), as image or image[] parts."},"prompt":{"type":"string"},"model":{"type":"string","enum":["daemon-image-pro"]},"n":{"type":"integer","minimum":1,"maximum":4},"size":{"type":"string","description":"Leave it out or send auto."},"response_format":{"type":"string","enum":["url","b64_json"]},"look":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","created":1760900000,"model":"daemon-image","size":"1024x1024","data":[{"url":"https://api.braindaemon.com/v1/images/files/3b1f0c2e-7d4a-4f5b-9c8e-2a6d1e0f0001.1760900900.AbCdEfGhIjKlMnOpQrStUvWxYz0123456789_-AbCd","expires_at":1760900900,"width":1024,"height":1024}],"usage":{"credits":10,"images":1,"failed":0}}}}}}},"202":{"description":"The pictures are still being made after the wait (120 seconds by default). Fetch them with GET /v1/images/jobs/{id}; you are charged only for pictures that are made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the pictures.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageJobPending"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","object":"image.job","status":"in_progress","created":1760900000,"model":"daemon-image-pro","code":"timeout_pending","message":"The pictures are still being made (1 of 2 finished). Fetch them with GET /v1/images/jobs/imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ. You are charged only for pictures that are made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `size_unsupported`: The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer. `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"error":{"message":"n must be 1.","type":"invalid_request_error","code":"unsupported_parameter","param":"n"}}},"size_unsupported":{"summary":"The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","value":{"error":{"message":"size 2048x2048 is not offered. Use one of 1024x1024, 1536x1024, 1024x1536, 1024x768 (or square, wide, tall, classic), or auto.","type":"invalid_request_error","code":"size_unsupported","param":"size"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"402":{"description":"`insufficient_credits`: Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos. `insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_credits":{"summary":"Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos.","value":{"error":{"message":"Not enough credits for these pictures. You were not charged.","type":"insufficient_quota","code":"insufficient_credits","param":null}}},"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"error":{"message":"You have no credits left in this period.","type":"insufficient_quota","code":"insufficient_quota","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `rate_limited`: The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}},"rate_limited":{"summary":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","value":{"error":{"message":"This API key may make 10 pictures a minute. Retry in 12 seconds.","type":"rate_limit_error","code":"rate_limited","param":null}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"error":{"message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged.","type":"rate_limit_error","code":"concurrency_limit","param":null}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"error":{"message":"This key reached its daily cap of 300 credits.","type":"rate_limit_error","code":"daily_credit_cap","param":null}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"error":{"message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged.","type":"rate_limit_error","code":"capacity_busy","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/images/edits":{"post":{"operationId":"createImageEdit","summary":"Edit pictures with a prompt: multipart/form-data like the OpenAI SDK, or JSON with links or base64. A slow request answers 202 with a job id.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageEditRequest"},"examples":{"link":{"value":{"model":"daemon-image-pro","prompt":"Make it a snowy winter evening","image":"https://example.com/street.jpg"}}}},"multipart/form-data":{"schema":{"type":"object","required":["image","prompt"],"properties":{"image":{"type":"array","items":{"type":"string","format":"binary"},"description":"The picture(s) to change (JPEG, PNG or WebP), as image or image[] parts."},"prompt":{"type":"string"},"model":{"type":"string","enum":["daemon-image-pro"]},"n":{"type":"integer","minimum":1,"maximum":4},"size":{"type":"string","description":"Leave it out or send auto."},"response_format":{"type":"string","enum":["url","b64_json"]},"look":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","created":1760900000,"model":"daemon-image-pro","data":[{"url":"https://api.braindaemon.com/v1/images/files/3b1f0c2e-7d4a-4f5b-9c8e-2a6d1e0f0001.1760900900.AbCdEfGhIjKlMnOpQrStUvWxYz0123456789_-AbCd","expires_at":1760900900,"width":1024,"height":1024}],"usage":{"credits":30,"images":1,"failed":0}}}}}}},"202":{"description":"The pictures are still being made after the wait (120 seconds by default). Fetch them with GET /v1/images/jobs/{id}; you are charged only for pictures that are made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the pictures.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageJobPending"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","object":"image.job","status":"in_progress","created":1760900000,"model":"daemon-image-pro","code":"timeout_pending","message":"The pictures are still being made (1 of 2 finished). Fetch them with GET /v1/images/jobs/imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ. You are charged only for pictures that are made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `size_unsupported`: The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer. `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"error":{"message":"n must be 1.","type":"invalid_request_error","code":"unsupported_parameter","param":"n"}}},"size_unsupported":{"summary":"The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","value":{"error":{"message":"size 2048x2048 is not offered. Use one of 1024x1024, 1536x1024, 1024x1536, 1024x768 (or square, wide, tall, classic), or auto.","type":"invalid_request_error","code":"size_unsupported","param":"size"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"402":{"description":"`insufficient_credits`: Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos. `insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_credits":{"summary":"Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos.","value":{"error":{"message":"Not enough credits for these pictures. You were not charged.","type":"insufficient_quota","code":"insufficient_credits","param":null}}},"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"error":{"message":"You have no credits left in this period.","type":"insufficient_quota","code":"insufficient_quota","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `rate_limited`: The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}},"rate_limited":{"summary":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","value":{"error":{"message":"This API key may make 10 pictures a minute. Retry in 12 seconds.","type":"rate_limit_error","code":"rate_limited","param":null}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"error":{"message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged.","type":"rate_limit_error","code":"concurrency_limit","param":null}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"error":{"message":"This key reached its daily cap of 300 credits.","type":"rate_limit_error","code":"daily_credit_cap","param":null}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"error":{"message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged.","type":"rate_limit_error","code":"capacity_busy","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/images/variations":{"post":{"operationId":"createImageVariation","summary":"Make new pictures like one picture (the same subject, composition, style and mood; a new picture each), optionally steered by a prompt: multipart/form-data like the OpenAI SDK, or JSON with a link or base64. A slow request answers 202 with a job id.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageVariationRequest"},"examples":{"simple":{"value":{"image":"https://example.com/fox-in-snow.jpg","n":2}},"steered":{"value":{"image":"https://example.com/fox-in-snow.jpg","prompt":"the same scene at night under the northern lights","n":1,"response_format":"b64_json"}}}},"multipart/form-data":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"array","items":{"type":"string","format":"binary"},"description":"The picture(s) to change (JPEG, PNG or WebP), as image or image[] parts."},"prompt":{"type":"string"},"model":{"type":"string","enum":["daemon-image-pro"]},"n":{"type":"integer","minimum":1,"maximum":4},"size":{"type":"string","description":"Leave it out or send auto."},"response_format":{"type":"string","enum":["url","b64_json"]},"look":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","created":1760900000,"model":"daemon-image-pro","data":[{"url":"https://api.braindaemon.com/v1/images/files/3b1f0c2e-7d4a-4f5b-9c8e-2a6d1e0f0001.1760900900.AbCdEfGhIjKlMnOpQrStUvWxYz0123456789_-AbCd","expires_at":1760900900,"width":1024,"height":1024},{"url":"https://api.braindaemon.com/v1/images/files/3b1f0c2e-7d4a-4f5b-9c8e-2a6d1e0f0002.1760900900.AbCdEfGhIjKlMnOpQrStUvWxYz0123456789_-AbCd","expires_at":1760900900,"width":1024,"height":1024}],"usage":{"credits":60,"images":2,"failed":0}}}}}}},"202":{"description":"The pictures are still being made after the wait (120 seconds by default). Fetch them with GET /v1/images/jobs/{id}; you are charged only for pictures that are made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the pictures.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageJobPending"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","object":"image.job","status":"in_progress","created":1760900000,"model":"daemon-image-pro","code":"timeout_pending","message":"The pictures are still being made (1 of 2 finished). Fetch them with GET /v1/images/jobs/imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ. You are charged only for pictures that are made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `size_unsupported`: The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer. `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"error":{"message":"n must be 1.","type":"invalid_request_error","code":"unsupported_parameter","param":"n"}}},"size_unsupported":{"summary":"The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","value":{"error":{"message":"size 2048x2048 is not offered. Use one of 1024x1024, 1536x1024, 1024x1536, 1024x768 (or square, wide, tall, classic), or auto.","type":"invalid_request_error","code":"size_unsupported","param":"size"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"402":{"description":"`insufficient_credits`: Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos. `insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_credits":{"summary":"Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos.","value":{"error":{"message":"Not enough credits for these pictures. You were not charged.","type":"insufficient_quota","code":"insufficient_credits","param":null}}},"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"error":{"message":"You have no credits left in this period.","type":"insufficient_quota","code":"insufficient_quota","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `rate_limited`: The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}},"rate_limited":{"summary":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","value":{"error":{"message":"This API key may make 10 pictures a minute. Retry in 12 seconds.","type":"rate_limit_error","code":"rate_limited","param":null}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"error":{"message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged.","type":"rate_limit_error","code":"concurrency_limit","param":null}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"error":{"message":"This key reached its daily cap of 300 credits.","type":"rate_limit_error","code":"daily_credit_cap","param":null}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"error":{"message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged.","type":"rate_limit_error","code":"capacity_busy","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/images/tools":{"get":{"operationId":"listImageTools","summary":"List the photo tools open to your account, with what each needs and its live price.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageToolList"}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/images/tools/{tool}":{"post":{"operationId":"runImageTool","summary":"Run a photo tool on one picture (remove-background, upscale ...): multipart/form-data or JSON with a link or base64. Waits for the picture; a slow request answers 202 with a job id.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"parameters":[{"name":"tool","in":"path","required":true,"description":"The tool.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageToolRequest"}},"multipart/form-data":{"schema":{"type":"object","required":["image","prompt"],"properties":{"image":{"type":"array","items":{"type":"string","format":"binary"},"description":"The picture(s) to change (JPEG, PNG or WebP), as image or image[] parts."},"prompt":{"type":"string"},"model":{"type":"string","enum":["daemon-image-pro"]},"n":{"type":"integer","minimum":1,"maximum":4},"size":{"type":"string","description":"Leave it out or send auto."},"response_format":{"type":"string","enum":["url","b64_json"]},"look":{"type":"string"},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"}}}},"202":{"description":"The pictures are still being made after the wait (120 seconds by default). Fetch them with GET /v1/images/jobs/{id}; you are charged only for pictures that are made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the pictures.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageJobPending"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","object":"image.job","status":"in_progress","created":1760900000,"model":"daemon-image-pro","code":"timeout_pending","message":"The pictures are still being made (1 of 2 finished). Fetch them with GET /v1/images/jobs/imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ. You are charged only for pictures that are made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `size_unsupported`: The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer. `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"error":{"message":"n must be 1.","type":"invalid_request_error","code":"unsupported_parameter","param":"n"}}},"size_unsupported":{"summary":"The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","value":{"error":{"message":"size 2048x2048 is not offered. Use one of 1024x1024, 1536x1024, 1024x1536, 1024x768 (or square, wide, tall, classic), or auto.","type":"invalid_request_error","code":"size_unsupported","param":"size"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"402":{"description":"`insufficient_credits`: Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos. `insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_credits":{"summary":"Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos.","value":{"error":{"message":"Not enough credits for these pictures. You were not charged.","type":"insufficient_quota","code":"insufficient_credits","param":null}}},"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"error":{"message":"You have no credits left in this period.","type":"insufficient_quota","code":"insufficient_quota","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `rate_limited`: The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}},"rate_limited":{"summary":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","value":{"error":{"message":"This API key may make 10 pictures a minute. Retry in 12 seconds.","type":"rate_limit_error","code":"rate_limited","param":null}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"error":{"message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged.","type":"rate_limit_error","code":"concurrency_limit","param":null}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"error":{"message":"This key reached its daily cap of 300 credits.","type":"rate_limit_error","code":"daily_credit_cap","param":null}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"error":{"message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged.","type":"rate_limit_error","code":"capacity_busy","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/images/mockup":{"get":{"operationId":"getImageMockup","summary":"Mockup / Try it on: the modes open to your account and the live price of one mockup.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"image.mockup"},"name":{"type":"string"},"modes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["wear","print","place"]},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name","description"],"additionalProperties":false},"description":"The modes offered right now."},"available":{"type":"boolean","description":"A mockup can be made right now (false: busy for a while)."},"pricing":{"type":"object","properties":{"credits_per_image":{"description":"Credits for one mockup right now (listed = charged; null: not available right now). Charged only when the picture is made.","type":["number","null"]}},"required":["credits_per_image"],"additionalProperties":false}},"required":["object","name","modes","available","pricing"],"additionalProperties":false},"examples":{"default":{"value":{"object":"image.mockup","name":"Mockup / Try it on","modes":[{"id":"wear","name":"Wear it","description":"The person, mannequin or figure in the main picture wears the item (clothes, shoes, a bag, glasses, a hat ...), fitted to the body and pose; everything else stays the same."},{"id":"print","name":"Put it on as a print","description":"The item (a logo, a design, a picture) appears printed on the main surface of the garment or product in the main picture (a t-shirt, a mug, a bag, a cap, a cover)."},{"id":"place","name":"Place it in the scene","description":"The item is placed naturally in the scene of the main picture (on a wall, a table, the floor or a shelf) at a believable size, with matching light and shadows."}],"available":true,"pricing":{"credits_per_image":40}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}},"post":{"operationId":"createImageMockup","summary":"Mockup / Try it on: put an item on a person (wear), print it on a garment or product (print), or place it in a scene (place): multipart/form-data or JSON with links or base64. Waits for the picture; a slow request answers 202 with a job id.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["wear","print","place"],"description":"What to do with the item: wear (The person, mannequin or figure in the main picture wears the item (clothes, shoes, a bag, glasses, a hat ...), fitted to the body and pose; everything else stays the same); print (The item (a logo, a design, a picture) appears printed on the main surface of the garment or product in the main picture (a t-shirt, a mug, a bag, a cap, a cover)); place (The item is placed naturally in the scene of the main picture (on a wall, a table, the floor or a shelf) at a believable size, with matching light and shadows). Required."},"image":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}]},{"maxItems":2,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}]}}],"description":"The main picture: the person or mannequin to dress (wear), the garment or product to print on (print) or the scene to place the item in (place). A file in a multipart body (image), or in JSON an https link, a data: URL or base64. JPEG, PNG or WebP. A list of two is the main picture, then the item."},"item_image":{"description":"The item's picture (clothes, shoes, a logo or design, a poster, a product ...): a file (item_image) or a link, a data: URL or base64. Optional when prompt describes the item.","anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}]},"prompt":{"description":"Words about the item, in any language: required without an item picture (for example \"a red knitted scarf\"); with it, optional details (\"the logo small, on the left chest\").","type":"string"},"response_format":{"description":"url (default): a signed link that expires (expires_at); b64_json: the picture itself as base64.","type":"string","enum":["url","b64_json"]},"size":{"description":"Leave it out or send auto: a mockup keeps the shape of the main picture.","type":"string"},"user":{"description":"Your own id for the end user; stored only as a hash, for abuse checks.","type":"string","maxLength":256}},"required":["mode","image"],"additionalProperties":{}},"examples":{"place":{"value":{"mode":"place","image":"https://example.com/living-room.jpg","item_image":"https://example.com/mountain-poster.png","prompt":"framed, above the sofa"}},"wear":{"value":{"mode":"wear","image":"https://example.com/mannequin.jpg","prompt":"a red knitted scarf with white stripes"}},"print":{"value":{"mode":"print","image":"https://example.com/white-mug.jpg","item_image":"https://example.com/fox-logo.png","response_format":"b64_json"}}}},"multipart/form-data":{"schema":{"type":"object","required":["image","mode"],"properties":{"image":{"type":"string","format":"binary","description":"The main picture (JPEG, PNG or WebP): the person, the garment or product, or the scene."},"item_image":{"type":"string","format":"binary","description":"The item's picture (optional when prompt describes the item)."},"mode":{"type":"string","enum":["wear","print","place"]},"prompt":{"type":"string"},"size":{"type":"string","description":"Leave it out or send auto."},"response_format":{"type":"string","enum":["url","b64_json"]},"user":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","created":1760900000,"model":"mockup","data":[{"url":"https://api.braindaemon.com/v1/images/files/3b1f0c2e-7d4a-4f5b-9c8e-2a6d1e0f0003.1760900900.AbCdEfGhIjKlMnOpQrStUvWxYz0123456789_-AbCd","expires_at":1760900900,"width":1024,"height":768}],"usage":{"credits":40,"images":1,"failed":0}}}}}}},"202":{"description":"The pictures are still being made after the wait (120 seconds by default). Fetch them with GET /v1/images/jobs/{id}; you are charged only for pictures that are made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the pictures.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageJobPending"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","object":"image.job","status":"in_progress","created":1760900000,"model":"daemon-image-pro","code":"timeout_pending","message":"The pictures are still being made (1 of 2 finished). Fetch them with GET /v1/images/jobs/imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ. You are charged only for pictures that are made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `size_unsupported`: The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer. `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"error":{"message":"n must be 1.","type":"invalid_request_error","code":"unsupported_parameter","param":"n"}}},"size_unsupported":{"summary":"The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","value":{"error":{"message":"size 2048x2048 is not offered. Use one of 1024x1024, 1536x1024, 1024x1536, 1024x768 (or square, wide, tall, classic), or auto.","type":"invalid_request_error","code":"size_unsupported","param":"size"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"402":{"description":"`insufficient_credits`: Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos. `insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_credits":{"summary":"Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos.","value":{"error":{"message":"Not enough credits for these pictures. You were not charged.","type":"insufficient_quota","code":"insufficient_credits","param":null}}},"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"error":{"message":"You have no credits left in this period.","type":"insufficient_quota","code":"insufficient_quota","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `rate_limited`: The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}},"rate_limited":{"summary":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","value":{"error":{"message":"This API key may make 10 pictures a minute. Retry in 12 seconds.","type":"rate_limit_error","code":"rate_limited","param":null}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"error":{"message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged.","type":"rate_limit_error","code":"concurrency_limit","param":null}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"error":{"message":"This key reached its daily cap of 300 credits.","type":"rate_limit_error","code":"daily_credit_cap","param":null}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"error":{"message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged.","type":"rate_limit_error","code":"capacity_busy","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/images/styles":{"get":{"operationId":"listImageStyles","summary":"List the named styles you can use with style on POST /v1/images/generations, with an example picture and the live price of each.","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The style id, for `style` on POST /v1/images/generations."},"object":{"type":"string","const":"image.style"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["fun","art","game","design"],"description":"The group the style belongs to: fun, art, game (game assets) or design."},"example":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"An example picture in this style (a public link on braindaemon.com)."}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"pricing":{"type":"object","properties":{"credits_per_image":{"type":"number","description":"Credits for one picture in this style right now (listed = charged). Charged only when the picture is made."}},"required":["credits_per_image"],"additionalProperties":false},"available":{"type":"boolean","description":"The style can be used right now (false: not included in your plan (reason not_in_plan), or busy for a while)."},"reason":{"type":"string","const":"not_in_plan"},"sizes":{"type":"array","items":{"type":"string"},"description":"The named sizes a picture in this style may ask for."},"max_n":{"type":"number","const":1,"description":"A styled request makes one picture."},"typical_seconds":{"type":"integer","description":"About how long a picture takes while the style is in use."},"slow_first":{"type":"boolean","description":"The first picture in a while may take up to a minute or two."}},"required":["id","object","name","description","category","example","pricing","available","sizes","max_n","typical_seconds","slow_first"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"examples":{"default":{"value":{"object":"list","data":[{"id":"pixel_art","object":"image.style","name":"Pixel art","description":"Retro game characters, items and maps.","category":"game","example":{"url":"https://braindaemon.com/studio/examples/ex-styles-pixel_art.webp"},"pricing":{"credits_per_image":10},"available":true,"sizes":["1024x1024","1536x1024","1024x1536","1024x768"],"max_n":1,"typical_seconds":8,"slow_first":false}]}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/images/jobs/{id}":{"get":{"operationId":"getImageJob","summary":"Fetch the pictures of an image request (fresh links every time). 202 while they are still being made; ?wait=N waits up to N seconds (at most 60).","tags":["Images"],"x-braindaemon-scope":"images","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The image job id (imgjob_...), from the id of a POST /v1/images answer.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","created":1760900000,"model":"daemon-image","size":"1024x1024","data":[{"url":"https://api.braindaemon.com/v1/images/files/3b1f0c2e-7d4a-4f5b-9c8e-2a6d1e0f0001.1760900900.AbCdEfGhIjKlMnOpQrStUvWxYz0123456789_-AbCd","expires_at":1760900900,"width":1024,"height":1024}],"usage":{"credits":10,"images":1,"failed":0}}}}}}},"202":{"description":"The pictures are still being made after the wait (120 seconds by default). Fetch them with GET /v1/images/jobs/{id}; you are charged only for pictures that are made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the pictures.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageJobPending"},"examples":{"default":{"value":{"id":"imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ","object":"image.job","status":"in_progress","created":1760900000,"model":"daemon-image-pro","code":"timeout_pending","message":"The pictures are still being made (1 of 2 finished). Fetch them with GET /v1/images/jobs/imgjob_7Hk2pQ9rT4vX1mN8bC3dF6gJ. You are charged only for pictures that are made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/images/files/{token}":{"get":{"operationId":"getImageFile","summary":"A signed, expiring link to one picture (as returned in data[].url). No key needed; it stops working at expires_at.","tags":["Images"],"x-braindaemon-scope":"none","security":[],"parameters":[{"name":"token","in":"path","required":true,"description":"The signed token in the picture link (as returned in data[].url).","schema":{"type":"string"}}],"responses":{"200":{"description":"The picture.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}}}}}},"503":{"description":"`capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/videos/generations":{"post":{"operationId":"createVideo","summary":"Start a video from a prompt, or from a picture. Answers 202 with the job id and the price; fetch the video with GET /v1/videos/generations/{id}.","tags":["Videos"],"x-braindaemon-scope":"videos","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoGenerationRequest"},"examples":{"fromWords":{"value":{"model":"daemon-video-quick","prompt":"A paper boat drifting down a rainy city street, cinematic, gentle rain sounds","duration":4,"aspect_ratio":"16:9"}},"fromPicture":{"value":{"model":"daemon-video-quick","prompt":"The waves roll in slowly and the palm leaves sway","image":"https://example.com/beach.jpg","duration":4}}}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"},"examples":{"default":{"value":{"id":"vidjob_4Rt8yU2iO6pA9sD1fG5hJ3kL","object":"video.job","status":"completed","created":1760900000,"model":"daemon-video-quick","duration":4,"aspect_ratio":"16:9","sound":true,"image_to_video":false,"progress":100,"credits":75,"data":[{"url":"https://api.braindaemon.com/v1/videos/files/5c2e1d3f-8e5b-4a6c-0d9f-3b7e2f1a0001.1760900900.ZyXwVuTsRqPoNmLkJiHgFeDcBa9876543210_-ZyXw","expires_at":1760900900,"poster_url":"https://api.braindaemon.com/v1/videos/files/5c2e1d3f-8e5b-4a6c-0d9f-3b7e2f1a0002.1760900900.ZyXwVuTsRqPoNmLkJiHgFeDcBa9876543210_-ZyXw","poster_expires_at":1760900900,"width":848,"height":480,"duration":4}],"usage":{"credits":75,"videos":1,"failed":0}}}}}}},"202":{"description":"The video is waiting to start or being made (status queued or in_progress, with an estimated progress). Fetch it with GET /v1/videos/generations/{id}; you are charged only when it is made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the video.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobPending"},"examples":{"default":{"value":{"id":"vidjob_4Rt8yU2iO6pA9sD1fG5hJ3kL","object":"video.job","status":"queued","created":1760900000,"model":"daemon-video-quick","duration":4,"aspect_ratio":"16:9","sound":true,"image_to_video":false,"progress":0,"credits":75,"code":"timeout_pending","message":"The video is waiting to start. Fetch it with GET /v1/videos/generations/vidjob_4Rt8yU2iO6pA9sD1fG5hJ3kL. You are charged only when it is made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `unsupported_parameter`: A parameter has a value the API does not support, such as `n` greater than 1. `size_unsupported`: The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"unsupported_parameter":{"summary":"A parameter has a value the API does not support, such as `n` greater than 1.","value":{"error":{"message":"n must be 1.","type":"invalid_request_error","code":"unsupported_parameter","param":"n"}}},"size_unsupported":{"summary":"The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","value":{"error":{"message":"size 2048x2048 is not offered. Use one of 1024x1024, 1536x1024, 1024x1536, 1024x768 (or square, wide, tall, classic), or auto.","type":"invalid_request_error","code":"size_unsupported","param":"size"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"402":{"description":"`insufficient_credits`: Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos. `insufficient_quota`: The plan has no credits left in this period, or the rest is held by calls that are still running.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_credits":{"summary":"Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos.","value":{"error":{"message":"Not enough credits for these pictures. You were not charged.","type":"insufficient_quota","code":"insufficient_credits","param":null}}},"insufficient_quota":{"summary":"The plan has no credits left in this period, or the rest is held by calls that are still running.","value":{"error":{"message":"You have no credits left in this period.","type":"insufficient_quota","code":"insufficient_quota","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet. `plan_required`: The account is not on a paid plan. API access is available on paid plans only.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"404":{"description":"`model_not_found`: The model id is not one of the daemons.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"model_not_found":{"summary":"The model id is not one of the daemons.","value":{"error":{"message":"The model daemon-ultra does not exist.","type":"invalid_request_error","code":"model_not_found","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account. `rate_limited`: The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today. `concurrency_limit`: Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed. `daily_credit_cap`: The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one). `capacity_busy`: BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}},"rate_limited":{"summary":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","value":{"error":{"message":"This API key may make 10 pictures a minute. Retry in 12 seconds.","type":"rate_limit_error","code":"rate_limited","param":null}}},"concurrency_limit":{"summary":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","value":{"error":{"message":"Too many requests are running at once for this API key or account, and the waiting line is full. Retry after 10 seconds (the retry-after header). You were not charged.","type":"rate_limit_error","code":"concurrency_limit","param":null}}},"daily_credit_cap":{"summary":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","value":{"error":{"message":"This key reached its daily cap of 300 credits.","type":"rate_limit_error","code":"daily_credit_cap","param":null}}},"capacity_busy":{"summary":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","value":{"error":{"message":"Every daemon is busy right now. Retry after the number of seconds in the retry-after header. You were not charged.","type":"rate_limit_error","code":"capacity_busy","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}},"/v1/videos/generations/{id}":{"get":{"operationId":"getVideoJob","summary":"The status, estimated progress and, once made, a signed link to the video and its cover (fresh links every time). 202 while it is made; ?wait=N waits up to N seconds (at most 60).","tags":["Videos"],"x-braindaemon-scope":"videos","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The video job id (vidjob_...), from the id of a POST /v1/videos/generations answer.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"},"examples":{"default":{"value":{"id":"vidjob_4Rt8yU2iO6pA9sD1fG5hJ3kL","object":"video.job","status":"completed","created":1760900000,"model":"daemon-video-quick","duration":4,"aspect_ratio":"16:9","sound":true,"image_to_video":false,"progress":100,"credits":75,"data":[{"url":"https://api.braindaemon.com/v1/videos/files/5c2e1d3f-8e5b-4a6c-0d9f-3b7e2f1a0001.1760900900.ZyXwVuTsRqPoNmLkJiHgFeDcBa9876543210_-ZyXw","expires_at":1760900900,"poster_url":"https://api.braindaemon.com/v1/videos/files/5c2e1d3f-8e5b-4a6c-0d9f-3b7e2f1a0002.1760900900.ZyXwVuTsRqPoNmLkJiHgFeDcBa9876543210_-ZyXw","poster_expires_at":1760900900,"width":848,"height":480,"duration":4}],"usage":{"credits":75,"videos":1,"failed":0}}}}}}},"202":{"description":"The video is waiting to start or being made (status queued or in_progress, with an estimated progress). Fetch it with GET /v1/videos/generations/{id}; you are charged only when it is made.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"location":{"description":"GET this path for the video.","schema":{"type":"string"}},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobPending"},"examples":{"default":{"value":{"id":"vidjob_4Rt8yU2iO6pA9sD1fG5hJ3kL","object":"video.job","status":"queued","created":1760900000,"model":"daemon-video-quick","duration":4,"aspect_ratio":"16:9","sound":true,"image_to_video":false,"progress":0,"credits":75,"code":"timeout_pending","message":"The video is waiting to start. Fetch it with GET /v1/videos/generations/vidjob_4Rt8yU2iO6pA9sD1fG5hJ3kL. You are charged only when it is made.","data":[]}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures). `content_blocked`: The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged. `provider_child_safety`: An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged. `provider_safety_filter`: An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked. `provider_filter_benign`: An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}},"content_blocked":{"summary":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","value":{"error":{"message":"This request was refused by the BrainDaemon content rules. You were not charged. Change the prompt or the picture and try again.","type":"invalid_request_error","code":"content_blocked","param":"prompt"}}},"provider_child_safety":{"summary":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","value":{"error":{"message":"An automatic child-safety filter stopped this request before any picture was made. You were not charged.","type":"invalid_request_error","code":"provider_child_safety","param":"prompt"}}},"provider_safety_filter":{"summary":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged. Try rewording it.","type":"invalid_request_error","code":"provider_safety_filter","param":"prompt"}}},"provider_filter_benign":{"summary":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","value":{"error":{"message":"An automatic safety filter of the image engine declined this request. You were not charged and it does not count against you.","type":"invalid_request_error","code":"provider_filter_benign","param":"prompt"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance. `capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}},"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}},"delete":{"operationId":"cancelVideoJob","summary":"Cancel a video that is still waiting to start (status queued): nothing is charged. A video already being made cannot be canceled (409).","tags":["Videos"],"x-braindaemon-scope":"videos","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The video job id (vidjob_...), from the id of a POST /v1/videos/generations answer.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"},"examples":{"default":{"value":{"id":"vidjob_4Rt8yU2iO6pA9sD1fG5hJ3kL","object":"video.job","status":"canceled","created":1760900000,"model":"daemon-video-quick","duration":4,"aspect_ratio":"16:9","sound":true,"image_to_video":false,"progress":0,"credits":75,"data":[],"usage":{"credits":0,"videos":0,"failed":0}}}}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}}}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/videos/models":{"get":{"operationId":"listVideoModels","summary":"The video models with their lengths, aspect ratios and live price per length.","tags":["Videos"],"x-braindaemon-scope":"videos","security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/RateLimitLimit"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/RateLimitRemaining"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/RateLimitReset"},"x-braindaemon-credits-remaining":{"$ref":"#/components/headers/CreditsRemaining"},"x-braindaemon-daily-cap-remaining":{"$ref":"#/components/headers/DailyCapRemaining"},"x-braindaemon-daily-cap-reset":{"$ref":"#/components/headers/DailyCapReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoModelList"}}}},"401":{"description":"`invalid_api_key`: The API key is missing, unknown, revoked or expired.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_key":{"summary":"The API key is missing, unknown, revoked or expired.","value":{"error":{"message":"Invalid API key. Create a key in Settings → API.","type":"invalid_request_error","code":"invalid_api_key","param":null}}}}}}},"403":{"description":"`api_access_disabled`: API access is not enabled for this account, or the plan does not include this daemon. `plan_required`: The account is not on a paid plan. API access is available on paid plans only. `scope_missing`: The key does not have the scope this endpoint needs (`chat` or `models`). `ip_not_allowed`: The key has an IP allowlist and the request came from another address. `account_suspended`: The account that owns the key is suspended. `key_paused`: The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app). `model_not_enabled`: The daemon exists but is not enabled for your account yet.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"api_access_disabled":{"summary":"API access is not enabled for this account, or the plan does not include this daemon.","value":{"error":{"message":"API access is not enabled for this account.","type":"permission_error","code":"api_access_disabled","param":null}}},"plan_required":{"summary":"The account is not on a paid plan. API access is available on paid plans only.","value":{"error":{"message":"API access needs a paid plan.","type":"permission_error","code":"plan_required","param":null}}},"scope_missing":{"summary":"The key does not have the scope this endpoint needs (`chat` or `models`).","value":{"error":{"message":"This key is missing the chat scope.","type":"permission_error","code":"scope_missing","param":null}}},"ip_not_allowed":{"summary":"The key has an IP allowlist and the request came from another address.","value":{"error":{"message":"Requests from 203.0.113.7 are not allowed for this key.","type":"permission_error","code":"ip_not_allowed","param":null}}},"account_suspended":{"summary":"The account that owns the key is suspended.","value":{"error":{"message":"This account is suspended.","type":"permission_error","code":"account_suspended","param":null}}},"key_paused":{"summary":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","value":{"error":{"message":"This key is paused. Contact support or create a new key.","type":"permission_error","code":"key_paused","param":null}}},"model_not_enabled":{"summary":"The daemon exists but is not enabled for your account yet.","value":{"error":{"message":"This daemon is not available on your account yet","type":"permission_error","code":"model_not_enabled","param":"model"}}}}}}},"429":{"description":"`rate_limit_exceeded`: Too many requests per minute for this key or for the account.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Too many requests per minute for this key or for the account.","value":{"error":{"message":"Rate limit reached: 60 requests per minute for this key.","type":"rate_limit_error","code":"rate_limit_exceeded","param":null}}}}}}},"500":{"description":"`internal_error`: Something unexpected failed on our side.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Something unexpected failed on our side.","value":{"error":{"message":"Internal error. Quote the request id to support.","type":"server_error","code":"internal_error","param":null}}}}}}},"503":{"description":"`maintenance`: The daemon cannot answer right now, or the API is paused for maintenance.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance":{"summary":"The daemon cannot answer right now, or the API is paused for maintenance.","value":{"error":{"message":"The BrainDaemon API is under maintenance. Retry in a minute.","type":"server_error","code":"maintenance","param":null}}}}}}}}}},"/v1/videos/files/{token}":{"get":{"operationId":"getVideoFile","summary":"A signed, expiring link to one video or its cover (as returned in data[].url and poster_url). No key needed; it stops working at expires_at.","tags":["Videos"],"x-braindaemon-scope":"none","security":[],"parameters":[{"name":"token","in":"path","required":true,"description":"The signed token in the video or cover link (as returned in data[].url and data[].poster_url).","schema":{"type":"string"}}],"responses":{"200":{"description":"The video (MP4) or its cover picture (JPEG).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"video/mp4":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","value":{"error":{"message":"messages[0].role must be one of system, developer, user, assistant, tool.","type":"invalid_request_error","code":"invalid_request","param":"messages"}}}}}}},"503":{"description":"`capability_unavailable`: Tool calling or structured output is temporarily unavailable for this daemon.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"capability_unavailable":{"summary":"Tool calling or structured output is temporarily unavailable for this daemon.","value":{"error":{"message":"Tool calling / structured output is temporarily unavailable for daemon-core.","type":"server_error","code":"capability_unavailable","param":null}}}}}}}}}}},"components":{"schemas":{"ChatCompletion":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer"},"model":{"type":"string","enum":["daemon-core","daemon-prime","daemon-omega"]},"skills_used":{"description":"BrainDaemon extension, only on requests with the skills field: the skill guides the daemon was given (empty when none fitted). In a stream it is on the first chunk.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The skill's stable library id, for example owner/repo/landing-page-builder."},"version":{"type":"string","description":"The version of the guide text the daemon was given (sha256: and 12 hex characters); it changes whenever the guide changes, so you can log exactly which guide was used."},"name":{"description":"The skill's short name, for example landing-page-builder. Absent for a private skill.","type":"string"},"title":{"description":"A readable title, for example Landing Page Builder. Absent for a private skill.","type":"string"},"category":{"description":"The skill's category. Absent for a private skill.","type":"string"},"description":{"description":"A short public summary of what the guide is for (one or two sentences; never the guide's text). Absent for a private skill.","type":"string"}},"required":["id","version"],"additionalProperties":false}},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"type":["string","null"]},"refusal":{"type":"null"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}},"reasoning_content":{"type":"string"},"annotations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"url_citation"},"url_citation":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"start_index":{"type":"integer"},"end_index":{"type":"integer"}},"required":["url","title","start_index","end_index"],"additionalProperties":false}},"required":["type","url_citation"],"additionalProperties":false}}},"required":["role","content","refusal"],"additionalProperties":false},"logprobs":{"type":"null"},"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter"]}},"required":["index","message","logprobs","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"credits":{"type":"number"},"prompt_tokens_details":{"description":"Present when part of the input was billed at the cached rate (either route).","type":"object","properties":{"cached_tokens":{"type":"integer","description":"Input tokens served from the daemon's prompt cache and billed at the lower cached rate (part of prompt_tokens)."}},"required":["cached_tokens"],"additionalProperties":false},"web_search":{"type":"object","properties":{"searches":{"type":"integer"},"page_reads":{"type":"integer"},"js_page_reads":{"type":"integer"},"credits":{"type":"number"},"cached":{"type":"integer"},"unavailable":{"type":"boolean"},"decided":{"description":"searched: the message needed fresh information, so a web search was made. skipped: it did not, so no search was made (and none charged); links in the message are still read.","type":"string","enum":["searched","skipped"]}},"required":["searches","page_reads","js_page_reads","credits","cached"],"additionalProperties":false},"overclock":{"description":"BrainDaemon extension: true when the answer ran overclocked (and was charged the daemon's Overclock multiplier).","type":"boolean"},"skills":{"type":"object","properties":{"decided":{"type":"string","enum":["picked","none"],"description":"picked: at least one skill guide was given to the daemon (see skills_used). none: no guide fitted the message (or skills could not be used)."},"cached":{"type":"boolean","description":"true: the pick of an identical earlier request (same key, categories and latest user message) was reused, at no cost."},"credits":{"type":"number","description":"Credits for the pick itself (part of usage.credits); 0 by default. The guide text is billed as normal input tokens."},"unavailable":{"description":"true: skills could not be used right now, so the answer came without them.","type":"boolean"}},"required":["decided","cached","credits"],"additionalProperties":false},"images":{"description":"BrainDaemon extension, only on requests with pictures (image_url parts): how many pictures the request carried.","type":"integer"},"image_credits":{"description":"BrainDaemon extension, only on requests with pictures: the credits for reading the new pictures (part of usage.credits). A picture this account sent recently is read again for free (its description still counts as input tokens).","type":"number"}},"required":["prompt_tokens","completion_tokens","total_tokens","credits"],"additionalProperties":false}},"required":["id","object","created","model","choices","usage"],"additionalProperties":false},"ChatCompletionChunk":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion.chunk"},"created":{"type":"integer"},"model":{"type":"string","enum":["daemon-core","daemon-prime","daemon-omega"]},"skills_used":{"description":"BrainDaemon extension, only on requests with the skills field: the skill guides the daemon was given (empty when none fitted). In a stream it is on the first chunk.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The skill's stable library id, for example owner/repo/landing-page-builder."},"version":{"type":"string","description":"The version of the guide text the daemon was given (sha256: and 12 hex characters); it changes whenever the guide changes, so you can log exactly which guide was used."},"name":{"description":"The skill's short name, for example landing-page-builder. Absent for a private skill.","type":"string"},"title":{"description":"A readable title, for example Landing Page Builder. Absent for a private skill.","type":"string"},"category":{"description":"The skill's category. Absent for a private skill.","type":"string"},"description":{"description":"A short public summary of what the guide is for (one or two sentences; never the guide's text). Absent for a private skill.","type":"string"}},"required":["id","version"],"additionalProperties":false}},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"delta":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"type":"string"},"reasoning_content":{"type":"string"},"annotations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"url_citation"},"url_citation":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"start_index":{"type":"integer"},"end_index":{"type":"integer"}},"required":["url","title","start_index","end_index"],"additionalProperties":false}},"required":["type","url_citation"],"additionalProperties":false}},"tool_calls":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"additionalProperties":false}},"required":["index"],"additionalProperties":false}}},"additionalProperties":false},"logprobs":{"type":"null"},"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter"]},{"type":"null"}]}},"required":["index","delta","logprobs","finish_reason"],"additionalProperties":false}},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"credits":{"type":"number"},"prompt_tokens_details":{"description":"Present when part of the input was billed at the cached rate (either route).","type":"object","properties":{"cached_tokens":{"type":"integer","description":"Input tokens served from the daemon's prompt cache and billed at the lower cached rate (part of prompt_tokens)."}},"required":["cached_tokens"],"additionalProperties":false},"web_search":{"type":"object","properties":{"searches":{"type":"integer"},"page_reads":{"type":"integer"},"js_page_reads":{"type":"integer"},"credits":{"type":"number"},"cached":{"type":"integer"},"unavailable":{"type":"boolean"},"decided":{"description":"searched: the message needed fresh information, so a web search was made. skipped: it did not, so no search was made (and none charged); links in the message are still read.","type":"string","enum":["searched","skipped"]}},"required":["searches","page_reads","js_page_reads","credits","cached"],"additionalProperties":false},"overclock":{"description":"BrainDaemon extension: true when the answer ran overclocked (and was charged the daemon's Overclock multiplier).","type":"boolean"},"skills":{"type":"object","properties":{"decided":{"type":"string","enum":["picked","none"],"description":"picked: at least one skill guide was given to the daemon (see skills_used). none: no guide fitted the message (or skills could not be used)."},"cached":{"type":"boolean","description":"true: the pick of an identical earlier request (same key, categories and latest user message) was reused, at no cost."},"credits":{"type":"number","description":"Credits for the pick itself (part of usage.credits); 0 by default. The guide text is billed as normal input tokens."},"unavailable":{"description":"true: skills could not be used right now, so the answer came without them.","type":"boolean"}},"required":["decided","cached","credits"],"additionalProperties":false},"images":{"description":"BrainDaemon extension, only on requests with pictures (image_url parts): how many pictures the request carried.","type":"integer"},"image_credits":{"description":"BrainDaemon extension, only on requests with pictures: the credits for reading the new pictures (part of usage.credits). A picture this account sent recently is read again for free (its description still counts as input tokens).","type":"number"}},"required":["prompt_tokens","completion_tokens","total_tokens","credits"],"additionalProperties":false},{"type":"null"}]}},"required":["id","object","created","model","choices"],"additionalProperties":false},"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","maxLength":128,"description":"daemon-core, daemon-prime or daemon-omega (aliases braindaemon-core, braindaemon-prime, braindaemon-omega)."},"messages":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","const":"system"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":{}},{"type":"object","properties":{"role":{"type":"string","const":"developer"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":{},"description":"Treated as a system message."},{"type":"object","properties":{"role":{"type":"string","const":"user"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"An https link to the picture, or a data: URL (data:image/png;base64,...). PNG, JPEG, WebP or GIF (its first frame)."},"detail":{"description":"low: a shorter description; high or auto (default): the full one. The same price.","anyOf":[{"type":"string","enum":["low","high","auto"]},{"type":"null"}]}},"required":["url"],"additionalProperties":{}},{"type":"string","description":"The link or data: URL itself (older form)."}]}},"required":["type","image_url"],"additionalProperties":{},"description":"A picture in a user message (vision). BrainDaemon reads it first (a safety check, then a detailed description: subjects, composition, camera, light, colours, style and any visible text) and the daemon answers from that description, so every daemon can answer about pictures. Each new picture costs vision credits (usage.image_credits); a picture this account sent recently is free. Needs pictures in messages to be open to your account."}]}}]},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":{}},{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},{"type":"null"}]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}],"description":"JSON text (an object is accepted and serialised)."}},"required":["name","arguments"],"additionalProperties":{}}},"required":["id","type","function"],"additionalProperties":{}}}},"required":["role"],"additionalProperties":{}},{"type":"object","properties":{"role":{"type":"string","const":"tool"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},"tool_call_id":{"type":"string"},"name":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":{}}],"description":"One chat message: system, developer, user, assistant (optionally with tool_calls) or tool (a tool result)."}},"stream":{"type":["boolean","null"]},"stream_options":{"anyOf":[{"type":"object","properties":{"include_usage":{"type":["boolean","null"]}},"additionalProperties":{}},{"type":"null"}]},"max_tokens":{"description":"The most tokens the answer may use; when you ask to receive the thinking (include_reasoning), it counts too (on the backup route, which serves tools, it always does). Thinking you do not receive is billed as completion tokens and stopped at a ceiling (on the backup route the daemon then answers without thinking). Default and ceiling: the daemon's maxOutputTokens (GET /v1/public-api/models-info); lowered automatically for a model that supports less.","anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"max_completion_tokens":{"description":"Same as max_tokens; wins when both are set.","anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"temperature":{"description":"Sampling control. Applied when the route serving the daemon supports it; otherwise ignored.","anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"description":"Sampling control. Applied when the route serving the daemon supports it; otherwise ignored.","anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"presence_penalty":{"description":"Applied when the route serving the daemon supports it; otherwise ignored.","anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"frequency_penalty":{"description":"Applied when the route serving the daemon supports it; otherwise ignored.","anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"stop":{"description":"Applied when the route serving the daemon supports it; otherwise ignored.","anyOf":[{"anyOf":[{"type":"string"},{"maxItems":4,"type":"array","items":{"type":"string"}}]},{"type":"null"}]},"seed":{"description":"Applied when the route serving the daemon supports it; otherwise ignored.","anyOf":[{"type":"integer"},{"type":"null"}]},"n":{"description":"Only 1 is supported.","anyOf":[{"type":"integer"},{"type":"null"}]},"response_format":{"description":"text (default), json_object or json_schema. json_object / json_schema: the answer is valid JSON (json_schema answers are checked against your schema; pattern and patternProperties are not checked by the API, and a schema using $ref is checked for valid JSON and its top-level type only). Without tools these requests usually run on the main engine. Invalid output is retried once, then 422 invalid_json_output; an answer cut off at max_tokens returns 422 at once. A 422 is not charged.","anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"json_object"}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":["boolean","null"]}},"additionalProperties":{}}},"required":["type","json_schema"],"additionalProperties":{}}]},{"type":"null"}]},"tools":{"description":"Function tools. When the daemon cannot serve tools right now: 503 capability_unavailable.","anyOf":[{"maxItems":128,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string"},"parameters":{"description":"A JSON Schema object for the arguments.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["name"],"additionalProperties":{}}},"required":["type","function"],"additionalProperties":{}}},{"type":"null"}]},"tool_choice":{"anyOf":[{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":{}}},"required":["type","function"],"additionalProperties":{}}]},{"type":"null"}]},"parallel_tool_calls":{"type":["boolean","null"]},"user":{"description":"Your end user's id. Stored hashed, for your own abuse tracking.","anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"include_reasoning":{"description":"BrainDaemon extension: receive the daemon's thinking as reasoning_content (streamed as it thinks). Default true (like the website); send false for the answer only.","type":["boolean","null"]},"reasoning_effort":{"description":"How much the daemon thinks before answering, on the backup route (which serves tools, and answers when the main engine is busy or down): none or low turn thinking off, medium turns it on with a short ceiling, high fully on (minimal counts as low; xhigh and higher count as high). Capped by the API key's thinking depth (Settings → API; default medium) unless that is client; the x-bd-reasoning-effort header (low, medium, high, client) replaces the key's setting for one call. On the main engine each daemon's depth is fixed and this field is ignored. Unset: the daemon's default (GET /v1/public-api/models-info reasoning.default; a request with tools thinks like that too, a request with response_format gets no thinking on the backup route). Thinking tokens are billed as completion tokens.","anyOf":[{"anyOf":[{"type":"string","enum":["none","minimal","low","medium","high"]},{"type":"string","pattern":"^x+high$"}]},{"type":"null"}]},"web_search":{"description":"BrainDaemon web search: true, or an object with options. BrainDaemon searches the web only when your question needs fresh information; links you paste are always read. Before the daemon answers, the latest user message is checked, searched when it needs fresh information (usage.web_search.decided says searched or skipped), and the links in it are read; the results go to the daemon as context and the answer lists them in choices[0].message.annotations. Needs a key with the web_search scope. Extra credits per search and page read (see usage.web_search), and a daily limit per account.","anyOf":[{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"read_links":{"description":"Read the http(s) links in the latest user message (default true).","type":"boolean"},"max_results":{"description":"Search results to give the daemon, 1-10 (default: the account setting, usually 5).","type":"integer","minimum":1,"maximum":10},"include_domains":{"description":"Search only these domains (at most 20 by default).","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-z0-9.-]+$"}},"exclude_domains":{"description":"Never search these domains (at most 20 by default).","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-z0-9.-]+$"}},"required":{"description":"true: answer 503 web_search_unavailable when web search cannot run; default false (the answer comes without web results and usage.web_search.unavailable is true).","type":"boolean"}},"additionalProperties":{}}]},{"type":"null"}]},"web_search_options":{"description":"OpenAI-compatible alias of web_search: an object turns web search on for keys with the web_search scope (search_context_size low = 3 results, medium = 5, high = 10; user_location and anything else is ignored). Keys without the scope: ignored. web_search: false wins over it."},"skills":{"description":"BrainDaemon skills: true (every category) or an object with options. Before the daemon answers, BrainDaemon reads the latest user message and picks the best expert skill guide(s) from the categories you allow, or none when no guide fits; the chosen guide's text goes to the daemon as reference material (your own instructions and output format always win). The answer lists them in skills_used, usage.skills says what was decided, and the x-braindaemon-skills header names them. The guide text counts as input tokens. Absent or false: no skills.","anyOf":[{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"categories":{"description":"Skill categories to choose from (GET /v1/skills/categories lists them with their counts): frontend, backend, quality, devops, ai, documents, data, mobile, bots, security, languages, general, other. Missing or empty: every category.","anyOf":[{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},{"type":"null"}]},"max":{"description":"The most skills to use for this request (default 1; at most 2 by default).","anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"required":{"description":"true: answer 503 skills_unavailable when skills cannot be used; default false (the answer comes without skills and usage.skills.unavailable is true).","type":["boolean","null"]}},"additionalProperties":{}}]},{"type":"null"}]},"overclock":{"description":"BrainDaemon extension: true runs the answer on the daemon's faster engine (about twice as fast on long answers) for more credits (see overclock_multiplier in GET /v1/models; usage.overclock says whether it applied). The X-BrainDaemon-Overclock: true header asks for the same (this field wins when both are sent). Never applies when the backup route answers (it has no faster engine), including requests with tools while they are served only there: those run and are billed normally. Not allowed on your plan or switched off: 403 overclock_not_allowed. Default false.","type":["boolean","null"]}},"required":["model","messages"],"additionalProperties":{}},"ChatMessage":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","const":"system"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":{}},{"type":"object","properties":{"role":{"type":"string","const":"developer"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":{},"description":"Treated as a system message."},{"type":"object","properties":{"role":{"type":"string","const":"user"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"An https link to the picture, or a data: URL (data:image/png;base64,...). PNG, JPEG, WebP or GIF (its first frame)."},"detail":{"description":"low: a shorter description; high or auto (default): the full one. The same price.","anyOf":[{"type":"string","enum":["low","high","auto"]},{"type":"null"}]}},"required":["url"],"additionalProperties":{}},{"type":"string","description":"The link or data: URL itself (older form)."}]}},"required":["type","image_url"],"additionalProperties":{},"description":"A picture in a user message (vision). BrainDaemon reads it first (a safety check, then a detailed description: subjects, composition, camera, light, colours, style and any visible text) and the daemon answers from that description, so every daemon can answer about pictures. Each new picture costs vision credits (usage.image_credits); a picture this account sent recently is free. Needs pictures in messages to be open to your account."}]}}]},"name":{"type":"string"}},"required":["role","content"],"additionalProperties":{}},{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},{"type":"null"}]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}],"description":"JSON text (an object is accepted and serialised)."}},"required":["name","arguments"],"additionalProperties":{}}},"required":["id","type","function"],"additionalProperties":{}}}},"required":["role"],"additionalProperties":{}},{"type":"object","properties":{"role":{"type":"string","const":"tool"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."}}]},"tool_call_id":{"type":"string"},"name":{"type":"string"}},"required":["role","content","tool_call_id"],"additionalProperties":{}}],"description":"One chat message: system, developer, user, assistant (optionally with tool_calls) or tool (a tool result)."},"ContentPart":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":{},"description":"A text content part. User messages may also carry image_url parts (pictures); audio and file parts get 400 unsupported_content."},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","permission_error","insufficient_quota","rate_limit_error","server_error"]},"code":{"type":"string","enum":["invalid_request","unsupported_content","unsupported_parameter","context_length_exceeded","invalid_api_key","api_access_disabled","plan_required","scope_missing","ip_not_allowed","account_suspended","key_paused","model_not_found","model_not_enabled","insufficient_quota","invalid_json_output","rate_limit_exceeded","concurrency_limit","daily_credit_cap","capacity_busy","web_search_limit","capability_unavailable","web_search_unavailable","maintenance","internal_error","overclock_not_allowed","skills_unavailable","content_blocked","provider_child_safety","insufficient_credits","size_unsupported","rate_limited","provider_safety_filter","provider_filter_benign"]},"param":{"type":["string","null"]}},"required":["message","type","code","param"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"ImageContentPart":{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"An https link to the picture, or a data: URL (data:image/png;base64,...). PNG, JPEG, WebP or GIF (its first frame)."},"detail":{"description":"low: a shorter description; high or auto (default): the full one. The same price.","anyOf":[{"type":"string","enum":["low","high","auto"]},{"type":"null"}]}},"required":["url"],"additionalProperties":{}},{"type":"string","description":"The link or data: URL itself (older form)."}]}},"required":["type","image_url"],"additionalProperties":{},"description":"A picture in a user message (vision). BrainDaemon reads it first (a safety check, then a detailed description: subjects, composition, camera, light, colours, style and any visible text) and the daemon answers from that description, so every daemon can answer about pictures. Each new picture costs vision credits (usage.image_credits); a picture this account sent recently is free. Needs pictures in messages to be open to your account."},"ImageEditRequest":{"type":"object","properties":{"prompt":{"type":"string","description":"What to make (or how to change the picture), in any language. Required."},"n":{"description":"How many pictures (1 by default; at most 4, or the lower limit your account has). Each is charged; one that fails is not.","type":"integer","minimum":1,"maximum":4},"response_format":{"description":"url (default): a signed link that expires (expires_at); b64_json: the picture itself as base64 (a picture over the size limit comes back as a url).","type":"string","enum":["url","b64_json"]},"look":{"description":"BrainDaemon extension: a look (style) id, for example cartoon or anime. See the Images guide for the list.","type":"string"},"user":{"description":"Your own id for the end user; stored only as a hash, for abuse checks.","type":"string","maxLength":256},"model":{"description":"daemon-image-pro (default; the image model that edits).","type":"string","enum":["daemon-image","daemon-image-pro","daemon-image-fast","daemon-image-text"]},"image":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}]}}],"description":"The picture(s) to change: files in a multipart body (image or image[]), or in JSON an https link, a data: URL or base64 (one, or a list of up to 4). JPEG, PNG or WebP."},"size":{"description":"Leave it out or send auto: an edit keeps the shape of your picture.","type":"string"},"mask":{"description":"Not supported: the image models change the whole picture. A request with a mask gets 400 unsupported_parameter.","not":{}}},"required":["prompt","image"],"additionalProperties":{}},"ImageGenerationRequest":{"type":"object","properties":{"prompt":{"type":"string","description":"What to make (or how to change the picture), in any language. Required."},"n":{"description":"How many pictures (1 by default; at most 4, or the lower limit your account has). Each is charged; one that fails is not.","type":"integer","minimum":1,"maximum":4},"response_format":{"description":"url (default): a signed link that expires (expires_at); b64_json: the picture itself as base64 (a picture over the size limit comes back as a url).","type":"string","enum":["url","b64_json"]},"look":{"description":"BrainDaemon extension: a look (style) id, for example cartoon or anime. See the Images guide for the list.","type":"string"},"user":{"description":"Your own id for the end user; stored only as a hash, for abuse checks.","type":"string","maxLength":256},"model":{"description":"daemon-image (default, good), daemon-image-pro (best), daemon-image-fast (fast, the cheapest; no text in pictures) or daemon-image-text (text-safe: readable text in any script). Without a model, quality picks one.","type":"string","enum":["daemon-image","daemon-image-pro","daemon-image-fast","daemon-image-text"]},"size":{"description":"The named sizes (auto, 256x256, 512x512, 1024x1024, 1536x1024, 1792x1024, 1024x1536, 1024x1792, 1024x768, 1536x1152, square, wide, tall, classic; auto and the square sizes make a square picture), or any WIDTHxHEIGHT within the bounds in GET /v1/models (size_bounds; default 256 to 4096 per side, at most 16,777,216 pixels), rounded to multiples of 16. Not with aspect_ratio. Each model makes the nearest ratio it offers (never upscaled): data[].size reports the real size.","type":"string"},"aspect_ratio":{"description":"BrainDaemon extension: W:H, for example 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 10:16, 16:10, 1:2, 2:1 (or any W:H within the bounds), or auto (the shape picked for your prompt). With resolution it picks the size for you. Not with size.","type":"string"},"resolution":{"description":"BrainDaemon extension: 1k (default, about 1 megapixel), 2k (about 4) or 4k (about 16). 2k and 4k: daemon-image-pro and daemon-image-text only, at their own price (GET /v1/models, resolutions), while available; otherwise 503 capability_unavailable (never charged). 4k takes about a minute: a request may answer 202 with a job id.","type":"string","enum":["1k","2k","4k"]},"quality":{"description":"Only picks the model when model is left out: fast, draft or basic -> daemon-image-fast; text or text-safe -> daemon-image-text; hd, high, best, premium or pro -> daemon-image-pro; anything else (low, medium, standard, good, auto) -> daemon-image.","type":"string","enum":["auto","standard","low","medium","good","hd","high","best","premium","pro","fast","draft","basic","text","text-safe","text_safe"]},"text_aware":{"description":"BrainDaemon extension (daemon-image only): when the prompt needs readable non-Latin text inside the picture (Arabic, Russian, Chinese ...), the picture runs on the text-safe route and is billed at its price (usage.credits shows it; the header x-braindaemon-route: text-safe says so). Latin text or no text: unchanged. Left out: the account's default (off unless BrainDaemon turned it on). For Arabic or other non-Latin text inside pictures, use daemon-image-pro or text_aware: true.","type":"boolean"},"style_image":{"description":"BrainDaemon extension (style reference): one picture or a list (files style_image or style_image[] in a multipart body; in JSON https links, data: URLs or base64; JPEG, PNG or WebP; at most max_style_images). The new pictures take the visual style these pictures share (medium, colours, light, texture), never their people, faces, logos or text. Each picture costs pricing.credits_per_style_image more. Not with style_id, style or look.","anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}]}}]},"style_id":{"description":"BrainDaemon extension (style reference): the id of one of your saved styles on braindaemon.com (Daemon Media → My style). The picture's own price. Not with style_image, style or look.","type":"string"},"style":{"description":"BrainDaemon extension (named styles): a style id from GET /v1/images/styles, at that style's own price (pricing.credits_per_image there); one picture (n 1) on daemon-image, a named size only. Not with style_image, style_id or look.","type":"string"}},"required":["prompt"],"additionalProperties":{}},"ImageJobPending":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"image.job"},"status":{"type":"string","const":"in_progress"},"created":{"type":"integer"},"model":{"type":"string","description":"The image model, or the photo tool id."},"code":{"type":"string","const":"timeout_pending"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"description":"A signed link to the picture (response_format url). It stops working at expires_at; GET /v1/images/jobs/{id} gives a fresh one while the picture is kept.","type":"string"},"b64_json":{"description":"The picture as base64 (response_format b64_json).","type":"string"},"expires_at":{"description":"BrainDaemon extension: when the url stops working (unix seconds).","type":"integer"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"size":{"description":"BrainDaemon extension: the real size of this picture (WIDTHxHEIGHT). A size may snap to the nearest ratio the model offers.","type":"string"}},"additionalProperties":false},"description":"Always empty here: fetch the pictures with GET /v1/images/jobs/{id}."}},"required":["id","object","status","created","model","code","message","data"],"additionalProperties":false},"ImageModel":{"type":"object","properties":{"id":{"type":"string","enum":["daemon-image","daemon-image-pro","daemon-image-fast","daemon-image-text"]},"object":{"type":"string","const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","const":"braindaemon"},"type":{"type":"string","const":"image","description":"BrainDaemon extension: an image model (POST /v1/images/generations and /v1/images/edits), not a chat daemon."},"display_name":{"type":"string"},"pricing":{"type":"object","properties":{"credits_per_image":{"description":"Credits for one generated picture right now (null: busy right now).","type":["number","null"]},"credits_per_edit":{"description":"Credits for one edited picture right now (null: this model does not edit, or busy).","type":["number","null"]},"credits_per_style_image":{"description":"Credits style_image adds to each picture (reading the style of your pictures); shown while style reference is open to your account.","type":"number"},"credits_per_variation":{"description":"Credits for one variation (POST /v1/images/variations) right now (null: busy); shown while variations are open to your account.","type":["number","null"]}},"required":["credits_per_image","credits_per_edit"],"additionalProperties":false,"description":"BrainDaemon extension: the live price per picture."},"sizes":{"type":"array","items":{"type":"string"},"description":"BrainDaemon extension: the named size values offered for generations."},"quality":{"description":"BrainDaemon extension: the quality this model is (the value of quality that picks it).","type":"string","enum":["fast","good","best","text"]},"aspect_ratios":{"description":"BrainDaemon extension: the named aspect_ratio values, and auto while the shape can be picked for the prompt (any W:H within size_bounds works too). Missing: only the named sizes are offered right now.","type":"array","items":{"type":"string"}},"size_bounds":{"description":"BrainDaemon extension: the bounds of a WIDTHxHEIGHT size or an aspect_ratio.","type":"object","properties":{"min_side":{"type":"integer"},"max_side":{"type":"integer"},"max_pixels":{"type":"integer"}},"required":["min_side","max_side","max_pixels"],"additionalProperties":false},"resolutions":{"description":"BrainDaemon extension: the price of one picture per resolution (1k; 2k and 4k on daemon-image-pro and daemon-image-text).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"credits_per_image":{"type":["number","null"]},"available":{"type":"boolean","description":"false: not possible right now (a request is refused with 503, never charged); it comes back by itself."}},"required":["credits_per_image","available"],"additionalProperties":false}},"max_n":{"type":"integer","description":"BrainDaemon extension: the most pictures one request may ask for."},"edits":{"type":"boolean","description":"BrainDaemon extension: this model can edit pictures (POST /v1/images/edits)."},"tools":{"description":"BrainDaemon extension: the photo tools (POST /v1/images/tools/{tool}) are open to your account; GET /v1/images/tools lists them with their prices.","type":"boolean"},"variations":{"description":"BrainDaemon extension: variations (POST /v1/images/variations) are open to your account on this model.","type":"boolean"},"style_reference":{"description":"BrainDaemon extension: style reference (style_image, style_id on POST /v1/images/generations) is open to your account.","type":"boolean"},"max_style_images":{"description":"BrainDaemon extension: the most style_image pictures one request may send.","type":"integer"},"saved_styles":{"description":"BrainDaemon extension: style_id (one of your saved styles on braindaemon.com) is accepted.","type":"boolean"},"styles":{"description":"BrainDaemon extension (daemon-image): the named styles you may name with style, with their price per picture (GET /v1/images/styles has the full list with examples).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"credits":{"type":"number","description":"Credits for one picture in this style."}},"required":["id","name","credits"],"additionalProperties":false}}},"required":["id","object","created","owned_by","type","display_name","pricing","sizes","max_n","edits"],"additionalProperties":false},"ImageResult":{"type":"object","properties":{"id":{"type":"string","description":"BrainDaemon extension: the image job id (imgjob_...), for GET /v1/images/jobs/{id}."},"created":{"type":"integer"},"model":{"type":"string","description":"The image model (daemon-image, daemon-image-pro, daemon-image-fast or daemon-image-text), the photo tool id for POST /v1/images/tools/{tool}, or mockup for POST /v1/images/mockup."},"size":{"description":"The size of generated pictures: a named size as sent, otherwise the first picture's real size (edits keep their picture's shape).","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"description":"A signed link to the picture (response_format url). It stops working at expires_at; GET /v1/images/jobs/{id} gives a fresh one while the picture is kept.","type":"string"},"b64_json":{"description":"The picture as base64 (response_format b64_json).","type":"string"},"expires_at":{"description":"BrainDaemon extension: when the url stops working (unix seconds).","type":"integer"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"size":{"description":"BrainDaemon extension: the real size of this picture (WIDTHxHEIGHT). A size may snap to the nearest ratio the model offers.","type":"string"}},"additionalProperties":false},"description":"One item per picture made. A picture that failed (and was not charged) is left out; usage.failed counts them."},"usage":{"type":"object","properties":{"credits":{"type":"number","description":"Credits charged for this request (only pictures that were made)."},"images":{"type":"integer"},"failed":{"type":"integer","description":"Pictures that could not be made (never charged)."}},"required":["credits","images","failed"],"additionalProperties":false}},"required":["id","created","model","data","usage"],"additionalProperties":false},"ImageToolList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["remove-background","new-background","relight","upscale","widen","product-shot","new-angle","change-season"],"description":"The tool id, for POST /v1/images/tools/{tool}."},"object":{"type":"string","const":"image.tool"},"name":{"type":"string"},"description":{"type":"string"},"prompt":{"type":"string","enum":["required","none"],"description":"required: send prompt (your words, any language); none: send no prompt."},"available":{"type":"boolean","description":"The tool can be used right now (false: switched off for a while, or busy)."},"pricing":{"type":"object","properties":{"credits_per_image":{"description":"Credits for one call right now (null: not available right now). Charged only when the picture is made.","type":["number","null"]}},"required":["credits_per_image"],"additionalProperties":false}},"required":["id","object","name","description","prompt","available","pricing"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"ImageToolRequest":{"type":"object","properties":{"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}],"description":"The picture: a file in a multipart body (image), or in JSON an https link, a data: URL or base64. JPEG, PNG or WebP. Exactly one."},"prompt":{"description":"Required by the tools that take words (new-background: where; new-angle: which angle; change-season: which season or time), in any language. The other tools take no prompt (400 unsupported_parameter).","type":"string"},"response_format":{"description":"url (default): a signed link that expires (expires_at); b64_json: the picture itself as base64.","type":"string","enum":["url","b64_json"]},"user":{"description":"Your own id for the end user; stored only as a hash, for abuse checks.","type":"string","maxLength":256}},"required":["image"],"additionalProperties":{}},"ImageVariationRequest":{"type":"object","properties":{"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}],"description":"The picture to make variations of: a file in a multipart body (image), or in JSON an https link, a data: URL or base64. JPEG, PNG or WebP. Exactly one."},"prompt":{"description":"BrainDaemon extension: optional words to steer the variations (for example \"the same scene at night\"), in any language. Left out: new pictures of the same subject, composition, style and mood.","type":"string"},"n":{"description":"How many variations (1 by default; at most 4, or the lower limit your account has). Each is charged; one that fails is not.","type":"integer","minimum":1,"maximum":4},"model":{"description":"daemon-image-pro (default; the image model that edits).","type":"string","enum":["daemon-image","daemon-image-pro","daemon-image-fast","daemon-image-text"]},"size":{"description":"Leave it out or send auto: a variation keeps the shape of your picture.","type":"string"},"response_format":{"description":"url (default): a signed link that expires (expires_at); b64_json: the picture itself as base64.","type":"string","enum":["url","b64_json"]},"user":{"description":"Your own id for the end user; stored only as a hash, for abuse checks.","type":"string","maxLength":256}},"required":["image"],"additionalProperties":{}},"Me":{"type":"object","properties":{"object":{"type":"string","const":"api_key"},"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["chat","models","web_search","images","videos"]}},"status":{"type":"string","enum":["active","paused","revoked","expired"]},"created":{"type":"integer"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}]},"last_used_at":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["id","name","prefix","scopes","status","created","expires_at","last_used_at"],"additionalProperties":false},"limits":{"type":"object","properties":{"requests_per_minute":{"type":"integer"},"max_concurrent":{"type":"integer"},"daily_credit_cap":{"type":"number"},"allowed_ips":{"type":"array","items":{"type":"string"}}},"required":["requests_per_minute","max_concurrent","daily_credit_cap","allowed_ips"],"additionalProperties":false},"usage":{"type":"object","properties":{"credits_spent_today":{"type":"number"},"credits_remaining":{"type":"number"},"period_end":{"type":"integer"},"daily_cap_remaining":{"description":"Credits this key may still spend today: its daily credit cap minus today's spend and what its running calls hold, never below 0. null when the key has no daily cap.","type":["number","null"]},"daily_cap_resets_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"When the key's daily cap resets: the next 00:00 UTC, in unix seconds. null when the key has no daily cap."},"account_daily_cap_remaining":{"description":"Credits the account may still spend today over all its keys together, when support set a daily cap for the account; null when there is none.","type":["number","null"]},"spendable_now":{"type":"number","description":"The most this key can spend right now: the smallest of credits_remaining, daily_cap_remaining and account_daily_cap_remaining (the ones that are not null)."}},"required":["credits_spent_today","credits_remaining","period_end","daily_cap_remaining","daily_cap_resets_at","account_daily_cap_remaining","spendable_now"],"additionalProperties":false},"balance":{"type":"object","properties":{"plan_credits_left":{"type":"number","description":"Plan credits left in this plan period (they reset at usage.period_end and never roll over)."},"one_time_credits":{"type":"number","description":"One-time credits left (credit packs, gifts and codes): they don't reset with the plan period."},"held_by_running_requests":{"type":"number","description":"Credits set aside for requests of the account that are still running; what they don't use comes back."},"total":{"type":"number","description":"What the account can spend: plan_credits_left + one_time_credits - held_by_running_requests, never below 0. Always equal to usage.credits_remaining."}},"required":["plan_credits_left","one_time_credits","held_by_running_requests","total"],"additionalProperties":false,"description":"BrainDaemon extension: the account's credits, broken down."},"overclock":{"description":"BrainDaemon extension: Overclock (the overclock request field) per daemon: whether it is allowed and its credit multiplier.","type":"object","properties":{"available":{"type":"boolean","description":"overclock: true is allowed on this account right now (the API switch and the plan)."},"daemons":{"type":"object","propertyNames":{"type":"string","enum":["daemon-core","daemon-prime","daemon-omega"]},"additionalProperties":{"type":"object","properties":{"available":{"type":"boolean"},"multiplier":{"type":"number"}},"required":["available","multiplier"],"additionalProperties":false},"required":["daemon-core","daemon-prime","daemon-omega"]}},"required":["available","daemons"],"additionalProperties":false}},"required":["object","key","limits","usage","balance"],"additionalProperties":false},"Message":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"message"},"role":{"type":"string","const":"assistant"},"model":{"type":"string"},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking"},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking","signature"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_use"},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","id","name","input"],"additionalProperties":false}]}},"stop_reason":{"anyOf":[{"type":"string","enum":["end_turn","max_tokens","stop_sequence","tool_use","refusal"]},{"type":"null"}]},"stop_sequence":{"type":["string","null"]},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"cache_creation_input_tokens":{"type":"integer"},"cache_read_input_tokens":{"type":"integer","description":"Input tokens served from the daemon's prompt cache and billed at the lower cached rate (not part of input_tokens)."},"credits":{"description":"BrainDaemon extension: credits charged for this call.","type":"number"}},"required":["input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"],"additionalProperties":false}},"required":["id","type","role","model","content","stop_reason","stop_sequence","usage"],"additionalProperties":false},"MessagesError":{"type":"object","properties":{"type":{"type":"string","const":"error"},"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","billing_error","permission_error","not_found_error","request_too_large","rate_limit_error","api_error","overloaded_error"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false},"request_id":{"type":"string"}},"required":["type","error"],"additionalProperties":false},"MessagesRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":128,"description":"A daemon id (daemon-core, daemon-prime, daemon-omega) or a claude-* name, which maps to a daemon (opus, sonnet, haiku: set by BrainDaemon, see the Claude Code guide)."},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":32,"description":"user, assistant, or system (a system message in the middle of the conversation; developer counts as system)."},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64}},"required":["type"],"additionalProperties":{},"description":"A content block: text, tool_use (assistant), tool_result (user), thinking / redacted_thinking (ignored on input), document with a text source. image and other documents get 400 unless the daemon reads them."}}]}},"required":["role","content"],"additionalProperties":{},"description":"One conversation turn: user, assistant or system, with a string or a list of content blocks (unknown block fields such as cache_control are ignored)."}},"max_tokens":{"type":"integer","minimum":1,"description":"The most tokens the answer may use (lowered automatically for a model that supports less)."},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type"],"additionalProperties":{}}}],"description":"The system prompt: a string or a list of text blocks (cache_control is accepted and ignored)."},"stream":{"type":["boolean","null"]},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"top_k":{"description":"Accepted and ignored."},"stop_sequences":{"description":"A list of strings; up to 4 are applied."},"tools":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"input_schema":{"description":"A JSON Schema object for the tool input.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"type":{"description":"Custom tools only. Server tools of other providers (web search, code execution, ...) are dropped.","type":"string"}},"required":["name"],"additionalProperties":{},"description":"A tool the daemon may call."}},{"type":"null"}]},"tool_choice":{"description":"auto (default), any (must call a tool), tool (must call the named tool) or none."},"metadata":{"description":"metadata.user_id is stored hashed, for your own abuse tracking."},"thinking":{"description":"Extended thinking. enabled maps budget_tokens to the daemon's thinking depth (below 4,000: low, below 16,000: medium, else high); adaptive and disabled leave the daemon's default (output_config.effort wins when set). The thinking comes back as thinking blocks when the daemon produced any (enabled, or adaptive without display omitted)."},"output_config":{"description":"output_config.effort (low, medium, high, max) sets the daemon's thinking depth; the rest is ignored."},"overclock":{"description":"BrainDaemon extension: the same as on chat completions.","type":["boolean","null"]},"skills":{"description":"BrainDaemon extension: the same as on chat completions."},"web_search":{"description":"BrainDaemon extension: the same as on chat completions."}},"required":["model","messages","max_tokens"],"additionalProperties":{}},"Model":{"type":"object","properties":{"id":{"type":"string","enum":["daemon-core","daemon-prime","daemon-omega"]},"object":{"type":"string","const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","const":"braindaemon"},"context_length":{"description":"BrainDaemon extension: the most input tokens a request may send to this daemon right now.","type":"integer"},"max_output_tokens":{"description":"BrainDaemon extension: the largest max_tokens every route of this daemon can give right now.","type":"integer"},"context_length_with_tools":{"description":"BrainDaemon extension: the most input tokens a request WITH tools may send to this daemon right now (absent when it cannot take tool calls).","type":"integer"},"max_output_tokens_with_tools":{"description":"BrainDaemon extension: the largest max_tokens a request WITH tools gets on the route that normally serves tool calls (absent when the daemon cannot take tool calls).","type":"integer"},"overclock_available":{"description":"BrainDaemon extension: overclock: true is allowed for this daemon on your account right now.","type":"boolean"},"overclock_multiplier":{"description":"BrainDaemon extension: an overclocked answer costs this many times the normal credits.","type":"number"}},"required":["id","object","created","owned_by"],"additionalProperties":false},"ModelList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","enum":["daemon-core","daemon-prime","daemon-omega"]},"object":{"type":"string","const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","const":"braindaemon"},"context_length":{"description":"BrainDaemon extension: the most input tokens a request may send to this daemon right now.","type":"integer"},"max_output_tokens":{"description":"BrainDaemon extension: the largest max_tokens every route of this daemon can give right now.","type":"integer"},"context_length_with_tools":{"description":"BrainDaemon extension: the most input tokens a request WITH tools may send to this daemon right now (absent when it cannot take tool calls).","type":"integer"},"max_output_tokens_with_tools":{"description":"BrainDaemon extension: the largest max_tokens a request WITH tools gets on the route that normally serves tool calls (absent when the daemon cannot take tool calls).","type":"integer"},"overclock_available":{"description":"BrainDaemon extension: overclock: true is allowed for this daemon on your account right now.","type":"boolean"},"overclock_multiplier":{"description":"BrainDaemon extension: an overclocked answer costs this many times the normal credits.","type":"number"}},"required":["id","object","created","owned_by"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","enum":["daemon-image","daemon-image-pro","daemon-image-fast","daemon-image-text"]},"object":{"type":"string","const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","const":"braindaemon"},"type":{"type":"string","const":"image","description":"BrainDaemon extension: an image model (POST /v1/images/generations and /v1/images/edits), not a chat daemon."},"display_name":{"type":"string"},"pricing":{"type":"object","properties":{"credits_per_image":{"description":"Credits for one generated picture right now (null: busy right now).","type":["number","null"]},"credits_per_edit":{"description":"Credits for one edited picture right now (null: this model does not edit, or busy).","type":["number","null"]},"credits_per_style_image":{"description":"Credits style_image adds to each picture (reading the style of your pictures); shown while style reference is open to your account.","type":"number"},"credits_per_variation":{"description":"Credits for one variation (POST /v1/images/variations) right now (null: busy); shown while variations are open to your account.","type":["number","null"]}},"required":["credits_per_image","credits_per_edit"],"additionalProperties":false,"description":"BrainDaemon extension: the live price per picture."},"sizes":{"type":"array","items":{"type":"string"},"description":"BrainDaemon extension: the named size values offered for generations."},"quality":{"description":"BrainDaemon extension: the quality this model is (the value of quality that picks it).","type":"string","enum":["fast","good","best","text"]},"aspect_ratios":{"description":"BrainDaemon extension: the named aspect_ratio values, and auto while the shape can be picked for the prompt (any W:H within size_bounds works too). Missing: only the named sizes are offered right now.","type":"array","items":{"type":"string"}},"size_bounds":{"description":"BrainDaemon extension: the bounds of a WIDTHxHEIGHT size or an aspect_ratio.","type":"object","properties":{"min_side":{"type":"integer"},"max_side":{"type":"integer"},"max_pixels":{"type":"integer"}},"required":["min_side","max_side","max_pixels"],"additionalProperties":false},"resolutions":{"description":"BrainDaemon extension: the price of one picture per resolution (1k; 2k and 4k on daemon-image-pro and daemon-image-text).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"credits_per_image":{"type":["number","null"]},"available":{"type":"boolean","description":"false: not possible right now (a request is refused with 503, never charged); it comes back by itself."}},"required":["credits_per_image","available"],"additionalProperties":false}},"max_n":{"type":"integer","description":"BrainDaemon extension: the most pictures one request may ask for."},"edits":{"type":"boolean","description":"BrainDaemon extension: this model can edit pictures (POST /v1/images/edits)."},"tools":{"description":"BrainDaemon extension: the photo tools (POST /v1/images/tools/{tool}) are open to your account; GET /v1/images/tools lists them with their prices.","type":"boolean"},"variations":{"description":"BrainDaemon extension: variations (POST /v1/images/variations) are open to your account on this model.","type":"boolean"},"style_reference":{"description":"BrainDaemon extension: style reference (style_image, style_id on POST /v1/images/generations) is open to your account.","type":"boolean"},"max_style_images":{"description":"BrainDaemon extension: the most style_image pictures one request may send.","type":"integer"},"saved_styles":{"description":"BrainDaemon extension: style_id (one of your saved styles on braindaemon.com) is accepted.","type":"boolean"},"styles":{"description":"BrainDaemon extension (daemon-image): the named styles you may name with style, with their price per picture (GET /v1/images/styles has the full list with examples).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"credits":{"type":"number","description":"Credits for one picture in this style."}},"required":["id","name","credits"],"additionalProperties":false}}},"required":["id","object","created","owned_by","type","display_name","pricing","sizes","max_n","edits"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","enum":["daemon-video-quick","daemon-video-hd","daemon-video-cinema"]},"object":{"type":"string","const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","const":"braindaemon"},"type":{"type":"string","const":"video","description":"BrainDaemon extension: a video model (POST /v1/videos/generations), not a chat daemon."},"display_name":{"type":"string"},"available":{"type":"boolean","description":"This model can be used on your account right now (switched on and in your plan)."},"durations":{"type":"array","items":{"type":"integer"},"description":"The lengths offered, in seconds."},"default_duration":{"anyOf":[{"type":"integer"},{"type":"null"}]},"aspect_ratios":{"type":"array","items":{"type":"string"}},"image_to_video":{"type":"boolean"},"sound":{"type":"boolean"},"pricing":{"type":"object","properties":{"per_duration":{"type":"array","items":{"type":"object","properties":{"seconds":{"type":"integer"},"credits":{"description":"Credits for a video from words (null: busy right now).","type":["number","null"]},"credits_from_image":{"description":"Credits for a video from a picture.","type":["number","null"]}},"required":["seconds","credits","credits_from_image"],"additionalProperties":false}}},"required":["per_duration"],"additionalProperties":false,"description":"The live price per length, the same credits as the same video on braindaemon.com."}},"required":["id","object","created","owned_by","type","display_name","available","durations","default_duration","aspect_ratios","image_to_video","sound","pricing"],"additionalProperties":false}]}}},"required":["object","data"],"additionalProperties":false},"SkillCategoryList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"A category id for skills.categories."},"count":{"type":"integer","description":"Skills in this category."}},"required":["id","count"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false},"VideoGenerationRequest":{"type":"object","properties":{"model":{"description":"daemon-video-quick (default), daemon-video-hd (sharper) or daemon-video-cinema (the best quality). GET /v1/videos/models lists the lengths and prices of each.","type":"string","enum":["daemon-video-quick","daemon-video-hd","daemon-video-cinema"]},"prompt":{"description":"What happens in the video, in any language. Required for a video from words; optional with image (the picture is brought to life).","type":"string"},"image":{"description":"One picture to start the video from (image-to-video): an https link, a data: URL or base64 (JPEG, PNG or WebP). The video keeps the picture's shape. input_reference is accepted as its name too.","anyOf":[{"type":"string"},{"type":"object","properties":{"image_url":{"anyOf":[{"type":"string"},{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}]}},"required":["image_url"]}]},"duration":{"description":"The length in seconds: one of the model's durations (GET /v1/videos/models). Left out: the model's default length. seconds is accepted as its name too.","type":"integer"},"aspect_ratio":{"description":"16:9 (default), 9:16, 1:1 or 4:3 (daemon-video-cinema: 16:9 or 9:16). With image: leave it out or send auto.","type":"string","enum":["16:9","9:16","1:1","4:3","auto"]},"sound":{"description":"Every video comes with sound: leave it out or send true (false gets 400 unsupported_parameter).","type":"boolean"},"look":{"description":"BrainDaemon extension: a look (style) id, for example cartoon or anime. See the Videos guide for the list.","type":"string"},"user":{"description":"Your own id for the end user; stored only as a hash, for abuse checks.","type":"string","maxLength":256}},"additionalProperties":{}},"VideoJob":{"type":"object","properties":{"id":{"type":"string","description":"The video job id (vidjob_...), for GET and DELETE /v1/videos/generations/{id}."},"object":{"type":"string","const":"video.job"},"status":{"type":"string","enum":["queued","in_progress","completed","failed","canceled"],"description":"queued (waiting to start), in_progress (being made), completed, canceled. A failed or refused video answers the error instead."},"created":{"type":"integer"},"model":{"type":"string","enum":["daemon-video-quick","daemon-video-hd","daemon-video-cinema"]},"duration":{"type":"integer","description":"The length asked for, in seconds."},"aspect_ratio":{"type":"string","description":"16:9, 9:16, 1:1, 4:3, or auto (a video from a picture keeps the picture's shape)."},"sound":{"type":"boolean"},"image_to_video":{"type":"boolean"},"progress":{"type":"integer","minimum":0,"maximum":100,"description":"An estimate in percent from how long this kind of video usually takes: 0 while queued, at most 95 until it is completed, then 100."},"credits":{"description":"The price of this video in credits: charged once, only when it is made.","type":["number","null"]},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"A signed link to the MP4 video. It stops working at expires_at; GET /v1/videos/generations/{id} gives a fresh one while the video is kept."},"expires_at":{"type":"integer","description":"When url stops working (unix seconds)."},"poster_url":{"description":"A signed link to the video's cover picture (JPEG), when one was made.","type":["string","null"]},"poster_expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"duration":{"description":"The video's length in seconds.","type":["number","null"]}},"required":["url","expires_at","poster_url","poster_expires_at","width","height","duration"],"additionalProperties":false},"description":"The video once completed (one item); empty while it is made or when it was canceled."},"usage":{"type":"object","properties":{"credits":{"type":"number","description":"Credits charged (0 until the video is made, and for a canceled video)."},"videos":{"type":"integer"},"failed":{"type":"integer"}},"required":["credits","videos","failed"],"additionalProperties":false}},"required":["id","object","status","created","model","duration","aspect_ratio","sound","image_to_video","progress","credits","data","usage"],"additionalProperties":false},"VideoJobPending":{"type":"object","properties":{"id":{"type":"string","description":"The video job id (vidjob_...), for GET and DELETE /v1/videos/generations/{id}."},"object":{"type":"string","const":"video.job"},"status":{"type":"string","enum":["queued","in_progress","completed","failed","canceled"],"description":"queued (waiting to start), in_progress (being made), completed, canceled. A failed or refused video answers the error instead."},"created":{"type":"integer"},"model":{"type":"string","enum":["daemon-video-quick","daemon-video-hd","daemon-video-cinema"]},"duration":{"type":"integer","description":"The length asked for, in seconds."},"aspect_ratio":{"type":"string","description":"16:9, 9:16, 1:1, 4:3, or auto (a video from a picture keeps the picture's shape)."},"sound":{"type":"boolean"},"image_to_video":{"type":"boolean"},"progress":{"type":"integer","minimum":0,"maximum":100,"description":"An estimate in percent from how long this kind of video usually takes: 0 while queued, at most 95 until it is completed, then 100."},"credits":{"description":"The price of this video in credits: charged once, only when it is made.","type":["number","null"]},"code":{"type":"string","const":"timeout_pending"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"A signed link to the MP4 video. It stops working at expires_at; GET /v1/videos/generations/{id} gives a fresh one while the video is kept."},"expires_at":{"type":"integer","description":"When url stops working (unix seconds)."},"poster_url":{"description":"A signed link to the video's cover picture (JPEG), when one was made.","type":["string","null"]},"poster_expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}]},"width":{"anyOf":[{"type":"integer"},{"type":"null"}]},"height":{"anyOf":[{"type":"integer"},{"type":"null"}]},"duration":{"description":"The video's length in seconds.","type":["number","null"]}},"required":["url","expires_at","poster_url","poster_expires_at","width","height","duration"],"additionalProperties":false},"description":"Always empty here: fetch the video with GET /v1/videos/generations/{id}."}},"required":["id","object","status","created","model","duration","aspect_ratio","sound","image_to_video","progress","credits","code","message","data"],"additionalProperties":false},"VideoModel":{"type":"object","properties":{"id":{"type":"string","enum":["daemon-video-quick","daemon-video-hd","daemon-video-cinema"]},"object":{"type":"string","const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","const":"braindaemon"},"type":{"type":"string","const":"video","description":"BrainDaemon extension: a video model (POST /v1/videos/generations), not a chat daemon."},"display_name":{"type":"string"},"available":{"type":"boolean","description":"This model can be used on your account right now (switched on and in your plan)."},"durations":{"type":"array","items":{"type":"integer"},"description":"The lengths offered, in seconds."},"default_duration":{"anyOf":[{"type":"integer"},{"type":"null"}]},"aspect_ratios":{"type":"array","items":{"type":"string"}},"image_to_video":{"type":"boolean"},"sound":{"type":"boolean"},"pricing":{"type":"object","properties":{"per_duration":{"type":"array","items":{"type":"object","properties":{"seconds":{"type":"integer"},"credits":{"description":"Credits for a video from words (null: busy right now).","type":["number","null"]},"credits_from_image":{"description":"Credits for a video from a picture.","type":["number","null"]}},"required":["seconds","credits","credits_from_image"],"additionalProperties":false}}},"required":["per_duration"],"additionalProperties":false,"description":"The live price per length, the same credits as the same video on braindaemon.com."}},"required":["id","object","created","owned_by","type","display_name","available","durations","default_duration","aspect_ratios","image_to_video","sound","pricing"],"additionalProperties":false},"VideoModelList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["daemon-video-quick","daemon-video-hd","daemon-video-cinema"]},"object":{"type":"string","const":"model"},"created":{"type":"integer"},"owned_by":{"type":"string","const":"braindaemon"},"type":{"type":"string","const":"video","description":"BrainDaemon extension: a video model (POST /v1/videos/generations), not a chat daemon."},"display_name":{"type":"string"},"available":{"type":"boolean","description":"This model can be used on your account right now (switched on and in your plan)."},"durations":{"type":"array","items":{"type":"integer"},"description":"The lengths offered, in seconds."},"default_duration":{"anyOf":[{"type":"integer"},{"type":"null"}]},"aspect_ratios":{"type":"array","items":{"type":"string"}},"image_to_video":{"type":"boolean"},"sound":{"type":"boolean"},"pricing":{"type":"object","properties":{"per_duration":{"type":"array","items":{"type":"object","properties":{"seconds":{"type":"integer"},"credits":{"description":"Credits for a video from words (null: busy right now).","type":["number","null"]},"credits_from_image":{"description":"Credits for a video from a picture.","type":["number","null"]}},"required":["seconds","credits","credits_from_image"],"additionalProperties":false}}},"required":["per_duration"],"additionalProperties":false,"description":"The live price per length, the same credits as the same video on braindaemon.com."}},"required":["id","object","created","owned_by","type","display_name","available","durations","default_duration","aspect_ratios","image_to_video","sound","pricing"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key: `Authorization: Bearer bd_live_…`."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"The same key in an `x-api-key` header."}},"headers":{"RequestId":{"description":"Unique id of this request (`req_…`). Quote it when you contact support.","schema":{"type":"string"}},"RateLimitLimit":{"description":"Requests per minute allowed for this key.","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}},"RateLimitReset":{"description":"Time until the request budget is full again, as a duration such as `1s` (the OpenAI format).","schema":{"type":"string","example":"1s"}},"CreditsRemaining":{"description":"Credits left in the plan period: after this call's charge on non-stream requests, before it on stream requests (sent before the answer exists; the last chunk's usage.credits has the cost).","schema":{"type":"number"}},"DailyCapRemaining":{"description":"Credits this key may still spend today under its daily credit cap (today's spend and what its running calls hold taken off). Like x-braindaemon-credits-remaining: after this call's charge on non-stream requests, before it on stream requests. Not sent when the key has no daily cap.","schema":{"type":"number"}},"DailyCapReset":{"description":"Time until the key's daily credit cap resets (00:00 UTC), as seconds with an `s`, such as `43200s` (the format of x-ratelimit-reset-requests). Not sent when the key has no daily cap.","schema":{"type":"string","example":"43200s"}},"RetryAfter":{"description":"Seconds to wait before retrying. Sent with 429, with 503 maintenance (60) and with 402 insufficient_quota while credits are held by running calls (15); not with 503 capability_unavailable.","schema":{"type":"integer"}}}},"x-error-codes":[{"code":"invalid_request","status":400,"type":"invalid_request_error","meaning":"The body is not valid JSON, a field has the wrong type or value, or the body is too large (4 MB for chat without pictures, 20 MB for requests with pictures).","whatToDo":"Read `error.message` and `error.param`, fix the request and send it again. Do not retry it unchanged."},{"code":"unsupported_content","status":400,"type":"invalid_request_error","meaning":"A message contains image, audio or file parts. Version 1 accepts text only.","whatToDo":"Send text parts only. Extract the text from documents before you send them."},{"code":"unsupported_parameter","status":400,"type":"invalid_request_error","meaning":"A parameter has a value the API does not support, such as `n` greater than 1.","whatToDo":"Remove the parameter or use a supported value (for `n`, 1)."},{"code":"context_length_exceeded","status":400,"type":"invalid_request_error","meaning":"The messages (with tools and the JSON schema) are longer than the daemon accepts. The limit per daemon is maxInputTokens in GET /v1/public-api/models-info.","whatToDo":"Shorten the messages or split the work into several calls. Do not retry it unchanged."},{"code":"invalid_api_key","status":401,"type":"invalid_request_error","meaning":"The API key is missing, unknown, revoked or expired.","whatToDo":"Check the `Authorization: Bearer` header. If the key was revoked or expired, create a new one in Settings → API."},{"code":"api_access_disabled","status":403,"type":"permission_error","meaning":"API access is not enabled for this account, or the plan does not include this daemon.","whatToDo":"Request API access in Settings → API, or use a daemon your plan includes."},{"code":"plan_required","status":403,"type":"permission_error","meaning":"The account is not on a paid plan. API access is available on paid plans only.","whatToDo":"Upgrade the account to a paid plan; the existing keys work again right away."},{"code":"scope_missing","status":403,"type":"permission_error","meaning":"The key does not have the scope this endpoint needs (`chat` or `models`).","whatToDo":"Create a key that has the scope."},{"code":"ip_not_allowed","status":403,"type":"permission_error","meaning":"The key has an IP allowlist and the request came from another address.","whatToDo":"Add the public IP address (or CIDR range) of your server to the key, or call from an allowed server."},{"code":"account_suspended","status":403,"type":"permission_error","meaning":"The account that owns the key is suspended.","whatToDo":"Contact BrainDaemon support."},{"code":"key_paused","status":403,"type":"permission_error","meaning":"The key is paused, by an administrator or automatically because its spending suddenly jumped (you then get a message in the app).","whatToDo":"Check whether the key leaked. Contact support to turn it back on, or create a new key and revoke this one. Do not retry: every call gets this error until the key is turned back on."},{"code":"model_not_found","status":404,"type":"invalid_request_error","meaning":"The model id is not one of the daemons.","whatToDo":"Use daemon-core, daemon-prime or daemon-omega. GET /v1/models lists them."},{"code":"model_not_enabled","status":403,"type":"permission_error","meaning":"The daemon exists but is not enabled for your account yet.","whatToDo":"Use daemon-core, daemon-prime or daemon-omega. GET /v1/models lists the daemons you can call."},{"code":"insufficient_quota","status":402,"type":"insufficient_quota","meaning":"The plan has no credits left in this period, or the rest is held by calls that are still running.","whatToDo":"Wait for running calls to finish (see `retry-after`) or for the next credit period, or upgrade the plan."},{"code":"invalid_json_output","status":422,"type":"invalid_request_error","meaning":"Structured output was requested, but the answer did not match the JSON schema after one retry, or it was cut off at max_tokens (then at once, without a retry).","whatToDo":"Raise max_tokens first: a small limit cuts the JSON off (at least 4000 when the daemon thinks: reasoning_effort medium or high, or Daemon Omega), or send reasoning_effort \"none\" on Daemon Core or Daemon Prime. Then simplify the schema or make the instructions clearer. A 422 costs nothing: no attempt is charged."},{"code":"rate_limit_exceeded","status":429,"type":"rate_limit_error","meaning":"Too many requests per minute for this key or for the account.","whatToDo":"Wait `retry-after` seconds and spread requests out, or ask for a higher limit."},{"code":"concurrency_limit","status":429,"type":"rate_limit_error","meaning":"Your key or account already runs as many requests at once as it may, and this one could not wait: the waiting line was full, or it waited the longest time allowed.","whatToDo":"Retry after `retry-after` seconds. Spread your requests out, or ask support for a higher limit. Never charged."},{"code":"daily_credit_cap","status":429,"type":"rate_limit_error","meaning":"The key reached its daily credit cap, or this call's expected cost would go over what it has left today (or over your account's daily API cap across all keys, when support set one).","whatToDo":"Wait until 00:00 UTC (see `retry-after`), set a smaller max_tokens so the expected cost fits, or ask support for a higher cap. The message says how much is left."},{"code":"capacity_busy","status":429,"type":"rate_limit_error","meaning":"BrainDaemon is at capacity: every daemon slot was busy for the longest wait allowed, or the waiting line was full.","whatToDo":"Retry after `retry-after` seconds. A call that gets this error is never charged."},{"code":"web_search_limit","status":429,"type":"rate_limit_error","meaning":"The account used its web searches and page reads for today, or web search is not included in its plan.","whatToDo":"Send the request without web_search, or retry after `retry-after` seconds (00:00 UTC). A call that gets this error is never charged and never reaches the daemon."},{"code":"capability_unavailable","status":503,"type":"server_error","meaning":"Tool calling or structured output is temporarily unavailable for this daemon.","whatToDo":"Retry later (this error has no `retry-after`), try another daemon, or send the request without tools or response_format."},{"code":"web_search_unavailable","status":503,"type":"server_error","meaning":"Web search could not run (it is switched off right now or the search failed) and the request set web_search.required.","whatToDo":"Retry later, or send the request without required: the answer then comes without web results and usage.web_search.unavailable is true. Never charged."},{"code":"maintenance","status":503,"type":"server_error","meaning":"The daemon cannot answer right now, or the API is paused for maintenance.","whatToDo":"Retry after `retry-after` seconds (60). The OpenAI SDKs retry automatically."},{"code":"internal_error","status":500,"type":"server_error","meaning":"Something unexpected failed on our side.","whatToDo":"Retry once. If it happens again, contact support with the `x-request-id` value."},{"code":"overclock_not_allowed","status":403,"type":"permission_error","meaning":"The request set `overclock: true`, but Overclock is not available: your plan does not include it, it is switched off for the API right now, or the daemon has no faster engine.","whatToDo":"Send the request without `overclock` (it then runs at the normal speed and price). `GET /v1/models` shows `overclock_available` per daemon. Do not retry it unchanged."},{"code":"skills_unavailable","status":503,"type":"server_error","meaning":"Skills could not be used (switched off right now, not available on this account, the pick could not run, or the key started too many new picks this minute) and the request set skills.required.","whatToDo":"Retry later, or send the request without required: the answer then comes without skills and usage.skills.unavailable is true. Never charged."},{"code":"content_blocked","status":400,"type":"invalid_request_error","meaning":"The BrainDaemon content rules refused the image or video prompt, or a picture you sent. Never charged.","whatToDo":"Change the prompt or the picture. Do not retry it unchanged: repeated refusals pause image and video generation on the account for a while."},{"code":"provider_child_safety","status":400,"type":"invalid_request_error","meaning":"An automatic child-safety filter stopped the image or video request before anything was made. It is not counted against you and never charged.","whatToDo":"If the request was innocent, change the wording a little (for example leave out ages, or descriptions of a child's body or clothing) and try again."},{"code":"insufficient_credits","status":402,"type":"insufficient_quota","meaning":"Not enough credits for these pictures or this video. Credits from a coupon or a gift pay for chat only, not for pictures or videos.","whatToDo":"Ask for fewer pictures (n), wait for the next credit period, or upgrade the plan. Never charged."},{"code":"size_unsupported","status":400,"type":"invalid_request_error","meaning":"The size is not one the image models offer (or it is switched off), or an edit sent a size (edits keep their picture's shape). For videos: an aspect_ratio the model does not offer.","whatToDo":"Use 1024x1024, 1536x1024, 1024x1536, 1024x768 or auto (GET /v1/models lists the sizes offered). For an edit, leave size out."},{"code":"rate_limited","status":429,"type":"rate_limit_error","meaning":"The key reached its pictures (or videos) per minute, day or month, or the account its plan's pictures or videos for today.","whatToDo":"Wait `retry-after` seconds (for a daily limit: until 00:00 UTC), or ask support for higher limits. Never charged."},{"code":"provider_safety_filter","status":400,"type":"invalid_request_error","meaning":"An automatic safety filter of the image or video engine stopped the request; it is not about minors (for example adult content). Never charged, but it counts as a refusal like content_blocked.","whatToDo":"Reword the request. Do not retry it unchanged: repeated refusals pause image generation on the account for a while."},{"code":"provider_filter_benign","status":400,"type":"invalid_request_error","meaning":"An automatic safety filter of the image or video engine stopped the request, but our own check found it safe (a false positive). Never charged and not counted against you.","whatToDo":"Change the wording a little and try again."}],"x-braindaemon-models":[{"id":"daemon-core","label":"Daemon Core","aliases":["braindaemon-core"],"contextTokens":200000,"maxOutputTokens":200000,"primary":{"maxInputTokens":200000,"maxOutputTokens":200000,"outputUpToWindow":true},"backup":{"maxInputTokens":256000,"maxOutputTokens":32768,"outputUpToWindow":false},"toolRoutes":{"primary":{"maxInputTokens":256000,"maxOutputTokens":32768,"outputUpToWindow":false},"backup":null},"creditsPer1kTokens":1,"streaming":true,"structuredOutput":true,"toolCalling":true,"reasoning":true},{"id":"daemon-prime","label":"Daemon Prime","aliases":["braindaemon-prime"],"contextTokens":256000,"maxOutputTokens":256000,"primary":{"maxInputTokens":256000,"maxOutputTokens":256000,"outputUpToWindow":true},"backup":{"maxInputTokens":256000,"maxOutputTokens":32768,"outputUpToWindow":false},"toolRoutes":{"primary":{"maxInputTokens":256000,"maxOutputTokens":32768,"outputUpToWindow":false},"backup":null},"creditsPer1kTokens":2.5,"streaming":true,"structuredOutput":true,"toolCalling":true,"reasoning":true},{"id":"daemon-omega","label":"Daemon Omega","aliases":["braindaemon-omega"],"contextTokens":256000,"maxOutputTokens":256000,"primary":{"maxInputTokens":256000,"maxOutputTokens":256000,"outputUpToWindow":true},"backup":{"maxInputTokens":256000,"maxOutputTokens":32768,"outputUpToWindow":false},"toolRoutes":{"primary":{"maxInputTokens":256000,"maxOutputTokens":32768,"outputUpToWindow":false},"backup":null},"creditsPer1kTokens":2.5,"streaming":true,"structuredOutput":true,"toolCalling":true,"reasoning":true}],"externalDocs":{"url":"https://braindaemon.com/docs/api","description":"BrainDaemon API docs"}}