Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.babysea.ai/llms.txt

Use this file to discover all available pages before exploring further.

BabySea exposes a regional /v1 API for image and video generation. App-level responses use one envelope and one error format across inference providers.

Generations

Create, track, cancel, delete, and list generation records.

Webhooks

Receive signed generation and credit events.

Model schema reference

Browse model identifiers, supported fields, pricing, and request examples.

Base URLs

Region valueBase URL
ushttps://api.us.babysea.ai/v1
euhttps://api.eu.babysea.ai/v1
jphttps://api.jp.babysea.ai/v1
API keys are region-specific. A key created in one region cannot authenticate against a different regional hostname.

Authentication

Pass the key in the Authorization header:
Terminal
Authorization: Bearer bye_your_api_key
Keys start with bye_. The full key is shown once when you create or rotate it.

Endpoints

MethodPathScopeDescription
GET/v1/statusaccount:readAPI key and account identity.
GET/v1/usageaccount:readRequest and generation usage. Accepts days from 1 to 90.
GET/v1/user/accountaccount:readAccount profile.
GET/v1/user/billingaccount:readPlan, credit balance, and subscription period.
GET/v1/estimate/{model_identifier}library:readEstimate cost. Accepts count, duration, resolution, and audio. count defaults to 1 and is capped at 100.
POST/v1/generate/image/{model_identifier}generation:writeStart an image generation.
POST/v1/generate/video/{model_identifier}generation:writeStart a video generation.
GET/v1/content/{generation_id}generation:readRetrieve one generation record.
GET/v1/content/listgeneration:readList generation records. See generations for pagination defaults.
DELETE/v1/content/{generation_id}generation:deleteDelete a generation and stored output files.
POST/v1/content/generation/cancel/{generation_id}generation:deleteCancel an in-flight generation when it is still cancelable.
GET/v1/health/inference/providershealth:readInference provider availability.
GET/v1/health/inference/modelshealth:readModel availability by inference provider.
GET/v1/health/storagehealth:readStorage health.
GET/v1/health/cachehealth:readCache health.
GET/v1/library/providerslibrary:readInference provider catalog.
GET/v1/library/modelslibrary:readModel catalog, schemas, inference providers, and pricing.

Generation request fields

Every model has a strict schema. Use /v1/library/models, the playground, or the model schema reference to inspect allowed values for a model.
FieldTypeNotes
generation_promptstringPrompt text. Required for most models.
generation_ratiostringAspect ratio, such as 1:1 or 16:9. Allowed values are model-specific.
generation_output_formatstringOutput format, such as png, jpg, webp, or mp4.
generation_output_numbernumberNumber of requested outputs. Maximum is model-specific.
generation_input_filestring[]Public file URLs for image-to-image or image-to-video models.
generation_input_file_last_contentstringOptional last-frame URL for video models that support it.
generation_durationnumberRequired for video models. Allowed durations are model-specific.
generation_resolutionstringUsed by models with resolution-specific pricing.
generation_generate_audiobooleanUsed by video models with audio pricing.
generation_provider_orderstringOptional provider priority. Use fastest or a model-supported order such as replicate, fal.
Unknown or unsupported fields are rejected for strict model schemas.

Success envelope

Successful app-level API responses use this envelope:
JSON
{
  "status": "success",
  "request_id": "req_...",
  "message": "Operation successful",
  "timestamp": "2026-04-28T12:00:00.000Z",
  "data": {}
}
Paginated responses add total, limit, and offset next to data.

Error envelope

Structured BSE errors use this envelope:
JSON
{
  "status": "error",
  "request_id": "req_...",
  "error": {
    "code": "BSE1002",
    "type": "authentication_failed",
    "message": "Invalid or expired API key.",
    "retryable": false,
    "details": {}
  }
}
See errors for the full code list.

Rate limits

Limits are per account, not per key. All keys under the same account share the same bucket.
PlanGeneral requests/minGeneration requests/min
Free3010
Starter6020
Pro15050
Scale300100
Enterprise600200
Rate-limited responses include Retry-After. All rate-limited routes include:
  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset

Concurrency limits

In addition to per-minute rate limits, BabySea caps the number of generations that can be in flight at the same time per account. Image and video are tracked separately.
PlanImage in flightVideo in flight
Free21
Starter52
Pro155
Scale3010
Enterprise6020
When the cap is reached, additional generation create requests return BSE1009 (concurrency_limit_exceeded, HTTP 429, retryable). Reduce parallelism or retry after active create requests finish.

Idempotency

POST /v1/generate/image/* and POST /v1/generate/video/* accept an optional Idempotency-Key request header. Use it to safely retry a generation request (for example after a network error) without creating duplicate work or duplicate charges.
Terminal
curl https://api.us.babysea.ai/v1/generate/image/bfl/flux-schnell \
  -H "Authorization: Bearer bye_your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 5b3e1c8a-9c1f-4d2e-9b3f-7c0a1e9d2f4c" \
  -d '{"generation_prompt":"A baby seal playing on Arctic ice"}'
Behavior:
  • Keys must match [A-Za-z0-9_\-:.]{1,255}. UUIDs work well.
  • Cached responses are returned for 24 hours after the original request completes.
  • A replayed response includes the Idempotency-Replayed: true response header. The original request_id, status code, and body are returned exactly as before.
  • Reusing a key with a different request body returns BSE2015 (idempotency_key_conflict, HTTP 409).
  • Reusing a key while the original request is still processing returns BSE2016 (idempotency_request_in_progress, HTTP 409, retryable).
  • Idempotency is scoped per account.

Malformed requests

Requests with an invalid method, path, parameter shape, or body shape can be rejected before BabySea returns a structured BSE error. Validate the request shape before retrying.