Skip to main content

Documentation Index

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

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

EggAPI is an AI model gateway for production generation workloads. The current public catalog exposes nano-banana image generation. Your application calls one REST API, EggAPI authenticates the request, creates a generation task, routes it to an upstream provider, records usage, deducts balance, stores generated files when needed, and can notify your webhook when the task finishes.

Quickstart

Create an API key, submit a generation task, and poll the result.

Authentication

Send API keys with the Bearer token format used by the backend.

Model

Review the single model currently published for public use.

API Reference

See response envelopes, pagination, errors, and OpenAPI-backed endpoints.

How EggAPI Works

1

Submit

Call POST /v1/generate with Authorization: Bearer YOUR_API_KEY, a supported model, and a prompt.
2

Route

The Go backend validates your key, creates a task, and sends it through the configured provider route chain.
3

Process

Workers poll upstream providers, apply fallback when routes fail, upload generated files to R2 when needed, and persist task output.
4

Settle

EggAPI deducts balance, writes usage records, and sends a signed webhook if you supplied webhook_url.

First Request

curl -X POST https://api.eggapi.ai/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nanobanana",
    "prompt": "A clean product render of a ceramic espresso cup on a walnut desk",
    "aspect_ratio": "16:9",
    "num_outputs": 1,
    "webhook_url": "https://webhook.site/your-webhook-id"
  }'
The current public generation API returns a task object with status pending. Use GET /v1/tasks/{id} until the status becomes completed or failed.
The current public catalog only exposes nano-banana. Use nanobanana as the API model value.