Skip to main content

Prerequisites

  1. Create and verify an imini account.
  2. Check your credit balance against model pricing.
  3. Create a key in API Keys.

Base URL

Authentication

Keep API keys on the server. Rotate leaked keys in API Keys.

Model IDs and media

Use the Workbench model ID for model. See the model page for legacy aliases. New tasks echo the submitted ID. Media must be accessible to the API. Images and audio also accept Base64 data URIs, up to 20 MiB per decoded image or 15 MiB per decoded clip. The full request is limited to 32 MiB. Video requires an HTTP(S) URL. Video mode is inferred from the supplied media and reference_type. Omit video_mode.

Asynchronous Task Model

Use the returned task_id to poll an image task every 2 seconds or a video task every 5 seconds.

Step 1: Submit the Generation Task

The example below uses the nano-banana model to generate a 1:1 image:
Successful response (HTTP 200):

Step 2: Poll the Task Result

Use the task_id returned above to poll until status becomes succeeded or failed:
Task status values: Successful response example (status: succeeded):

Error Handling

If an accepted task fails, read error in the poll response. Include task_id and request_id when contacting support.

Retries

Retry transient polling errors with backoff. A submission timeout does not mean no task was created. Avoid resubmitting to prevent duplicate charges.

Next Steps

API Reference

Model Pricing