Skip to main content
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

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
Keys start with bye_. The full key is shown once when you create or rotate it.

Endpoints

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. Unknown or unsupported fields are rejected for strict model schemas.

Success envelope

Successful app-level API responses use this envelope:
JSON
Paginated responses add total, limit, and offset next to data.

Error envelope

Structured BSE errors use this envelope:
JSON
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. 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. 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
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.