Skip to main content
EggAPI returns a consistent response envelope:
Successful responses use the same envelope with error: null.

Error Codes

Validation Errors

The generation request currently validates:
  • model: nanobanana
  • prompt: required, 1 to 2000 characters
  • negative_prompt: up to 1000 characters
  • num_outputs: 1 to 4
  • duration: 1 to 60
  • aspect_ratio: 16:9 or 9:16
  • resolution: 1k, 2k, or 4k
  • image_urls: up to 9 valid URLs
  • webhook_url: valid URL, up to 2048 characters
Example invalid model:

Authentication Errors

Missing header:
Invalid format:

Task Failures

A failed generation task is returned as successful HTTP 200 from GET /v1/tasks/{id} because the task lookup succeeded. The failure is represented inside data.status and data.error.

Handling Pattern

For task polling, check both the HTTP response envelope and the task status: