Skip to main content
This guide walks you through the full flow from setting up your account to making your first API call. It takes about 5 minutes.

Prerequisites

Before you start, please confirm the following:
1

Create an imini account

Visit imini.ai to register and verify your email.
2

Top up credits

All API calls are billed in credits. See Pricing for each model’s consumption rules. Please top up at Credits before making any calls.
3

Create an API Key

Go to the API Keys management page, create an API Key for server-side use, and store it securely.

Base URL

All imini Open Platform endpoints share the same base URL:
The relative paths in the examples below (such as /v1/images/generate) should be appended to this base URL.

Authentication

Every request authenticates via an HTTP header using the Bearer Token standard:
API Key security: Only use your API Key on the server side. Never commit it to a code repository, ship it in frontend code or mobile apps, or expose it in any other way. If you suspect a key has leaked, rotate it immediately on the API Keys management page.

Asynchronous Task Model

All generation endpoints on imini (image and video) use an asynchronous task model. A complete generation flow is two steps:
The image task query endpoint is /v1/images/tasks/{task_id}; the video task query endpoint is /v1/videos/tasks/{task_id}. A polling interval of 2 seconds is recommended. Image tasks typically complete within 10–30 seconds.

Step 1: Submit the Generation Task

The example below uses the google/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

All error responses share a unified structure:
Common HTTP status codes:
Every response includes a request_id. Please include it when submitting tickets or contacting support so we can investigate quickly.

Production Integration Tips

Before integrating imini into production, review the following practices:
  • Set reasonable polling intervals: We recommend a first poll at 2 seconds, then exponential backoff (2s / 3s / 5s) to reduce pressure on the query endpoint.
  • Configure sensible timeouts: Use a 30-second timeout for submission calls. Set overall polling timeouts based on the model (e.g., 2 minutes for image, 10 minutes for video).
  • Error retry strategy: For 429, 500, and 502, retry 2–3 times with random jitter. Do not retry 400, 401, or 402.
  • API Key rotation: Store API Keys in a secrets manager (KMS / Secrets Manager), rotate them regularly, and use separate keys per business scenario for observability and isolation.
  • Idempotency and request tracing: Record the submitted task_id and request_id on your side to reconcile against platform logs.
  • Content safety: We recommend pre-screening user-supplied prompts and reference images on your side to reduce the likelihood of triggering 400 content-violation errors.

Next Steps

API Reference

Full parameter definitions and an interactive Playground for each model

Pricing

Credit consumption rules by model, resolution, and scenario

Changelog

Track new model launches, parameter changes, and service updates

Terms & Policies

Please read the Terms of Service and Privacy Policy before onboarding