Skip to content
brainbabyOpen app

Brainbaby for developers

Build with the Brainbaby API

Connect Baby 5.0 chat, image generation and video workflows from your server. Start with an API key, choose a supported endpoint and handle the result in your own application.

Server-side API key · Image credits · Provider limits apply

Image generationPOST
curl --request POST 'https://dbrivssmjulprzhufgkw.supabase.co/functions/v1/developer-api/v1/images/generate' \
  --header "Authorization: Bearer $BRAINBABY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"prompt":"An illustrated manga city at dusk, crisp ink lines and warm lantern light"}'

A request example. Set BRAINBABY_API_KEY privately on your server before running it.

Quick start

From your server
to an image

Choose the account that owns your credits. Keep credentials out of browser bundles, shared prompts and screenshots.

  1. 01

    Create your API key

    Open Settings → API, create a named key and store it as a server environment variable. Requests use Authorization: Bearer YOUR_BRAINBABY_API_KEY.

  2. 02

    Check your image credits

    Generation and editing each reserve one image credit from the same balance as Image Studio. Purchased media credits can be used without a chat subscription. Review current plans and credit options.

  3. 03

    Submit, inspect and save

    Send the JSON request from your server. Read the HTTP status before using the returned URL, then download the result before expires_at. Review the image before delivering it.

Supported API operations

Choose the endpoint for the job

Base URL https://dbrivssmjulprzhufgkw.supabase.co/functions/v1/developer-api

POST/v1/chat/completions

Baby 5.0 chat; supports streaming with stream: true. Chat requires an eligible subscription and available AI allowance.

POST/v1/images/generate

Generate one image from a prompt. Reserves one image credit.

POST/v1/images/edit

Edit a publicly readable HTTPS sourceImage with a prompt. Reserves one image credit.

POST/v1/videos/generate

Submit a text or reference-image video request. Video credits depend on the supported settings.

POST/v1/videos/edit

Submit a short sourceVideo edit. Uses video credits.

GET/v1/videos/status?id=YOUR_JOB_ID

Read a video job with your API key; wait for completion before using the result.

Use the documented operations above. Website building, account calendar and memory are separate app workflows without public endpoints in this API.

Edit a reference image

Replace the example URL with an HTTPS image you have permission to use. Local file paths and inaccessible private URLs will not work.

curl --request POST 'https://dbrivssmjulprzhufgkw.supabase.co/functions/v1/developer-api/v1/images/edit' \
  --header "Authorization: Bearer $BRAINBABY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"sourceImage":"https://example.com/your-image.jpg","prompt":"Change the scene to moonlight. Preserve the character and outfit."}'

Read the image response

This is the response structure, with illustrative values. Delivery URLs can expire; save your output in your own storage.

{
  "id": "example-image-id",
  "url": "https://example.com/generated-image.png",
  "expires_at": "ISO-8601 expiry timestamp",
  "credits_remaining": 4
}

Handle failures deliberately

A clear result
before the next request

Image jobs can take time. A dropped connection does not prove a job was never submitted. Avoid automatic duplicate submissions and keep a record of errors and balances.

400

Invalid request

Review the JSON fields, source URL and content rules before submitting again.

401

API key not accepted

Check the Authorization header and whether the key is active. Keep it on your server.

402

Image credits required

Check the image balance and add credits to the same Brainbaby account.

409

Credit reservation conflict

Another request may have changed the balance. Check the existing request before trying again.

429

Request limit reached

Reduce concurrency and wait before sending another request.

5xx

Service or provider error

Log the response and inspect the account balance. An image failure attempts a credit refund; contact support if it does not arrive.

Before you integrate

Image API questions

For adults 18+ using the service lawfully. Content rules and provider restrictions apply. “Uncensored” is not a guarantee of acceptance.

What is the uncensored AI image API?

It is Brainbaby’s developer workflow for image generation and prompt-based editing. “Uncensored” does not mean every request is accepted: Brainbaby’s hard content rules and provider limits still apply.

Can I use it for manga and game-art workflows?

You can request permitted fictional characters, environments and non-graphic action scenes. Use images you own or have permission to edit. Check character continuity, hands, text and composition before delivering work to a client.

Do I need a subscription for image API requests?

Image generation and editing require an active API key and image credits, rather than a chat subscription. Studio and API requests use the same image-credit balance. Chat access has separate subscription and AI-allowance requirements.

How much does an API image cost?

The current generation and editing operations each reserve one image credit. Your cash cost depends on your credit pack or plan. Review current pricing; this page does not promise a fixed price per image or free API requests.

How do reference images work?

Send sourceImage as a publicly readable HTTPS URL to /v1/images/edit. The server must be able to fetch it; a private device path will not work. Review access to the source URL before using confidential client artwork.

What does a successful image response contain?

The response includes id, url, expires_at and credits_remaining. Download the result before the delivery URL expires. The response example on this page illustrates the shape and is not a recorded generation result.

Can I retry a request automatically?

Do not blindly repeat a generation after a network timeout. Each accepted request can reserve another credit, and the image endpoint does not advertise an idempotency key. Record the response and check existing work and balances first.

Where is my API key?

Sign in to the account that owns your credits, open Settings → API and create a key. Send it as Authorization: Bearer YOUR_BRAINBABY_API_KEY from your server. Revoke a key if it becomes exposed.

Start with your first request

Create a key, check the balance and send a permitted brief from your server.

Get an API key