Introduction
The ImagineLab API is a REST API over HTTPS. All requests go to https://api.imagineview.art/api/v1, accept and return JSON, and are authenticated with a bearer token. Generation is asynchronous: you create a job, then poll its status until the outputs are ready.
Programmatic access
Dedicated API keys ship with the Ultimate Visionary Studio and Titan Studio plans. Until your key is issued you can authenticate with the bearer token returned by the login endpoint below.Getting Started
- Create an account and buy a credit package (every generation spends credits).
- Get a bearer token from
POST /auth/login. - Create a generation with
POST /generations. - Poll
GET /generations/{id}/statusuntil it iscompleted. - Read the result from
GET /generations/{id}.
Authentication
Exchange your email and password for an access token. The login endpoint follows the OAuth2 password flow, so the body is x-www-form-urlencoded with username (your email) and password.
curl -X POST https://api.imagineview.art/api/v1/auth/login \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=you@example.com&password=YOUR_PASSWORD"
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer"
}Send the token in the Authorization header on every protected request:
Authorization: Bearer YOUR_ACCESS_TOKEN
Other auth routes: POST /auth/signup, GET /auth/me, POST /auth/forgot-password.
Generations
A generation is an async job. Creating one immediately reserves its credit cost and returns a record with status: "pending". The job then moves through processing to completed or failed.
List available models
Create a generation
Request body:
{
"generation_type": "image", // image | video | voice | music | infographic | text
"model_name": "seedream-5.0-lite", // from /generations/models
"prompt": "A neon city skyline at dusk, ultra-detailed",
"settings": { "aspect_ratio": "16:9" }, // type-specific, optional
"project_id": null // optional: tag to a project
}curl -X POST https://api.imagineview.art/api/v1/generations \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"generation_type": "image",
"model_name": "seedream-5.0-lite",
"prompt": "A neon city skyline at dusk"
}'{
"id": 1842,
"user_id": 17,
"generation_type": "image",
"model_name": "seedream-5.0-lite",
"prompt": "A neon city skyline at dusk",
"status": "pending",
"credit_cost": 5,
"created_at": "2026-06-07T12:00:00Z",
"outputs": []
}Poll status
{ "id": 1842, "status": "completed", "progress": 100 }Fetch the result
Returns the full generation with an outputs array (media URLs or text). Also useful: GET /generations (history, paginated) and DELETE /generations/{id}.
End-to-end example
import time, requests
BASE = "https://api.imagineview.art/api/v1"
# 1. Login
tok = requests.post(f"{BASE}/auth/login", data={
"username": "you@example.com", "password": "YOUR_PASSWORD",
}).json()["access_token"]
H = {"Authorization": f"Bearer {tok}"}
# 2. Create
gen = requests.post(f"{BASE}/generations", headers=H, json={
"generation_type": "image",
"model_name": "seedream-5.0-lite",
"prompt": "A neon city skyline at dusk",
}).json()
gid = gen["id"]
# 3. Poll
while True:
s = requests.get(f"{BASE}/generations/{gid}/status", headers=H).json()
if s["status"] in ("completed", "failed"):
break
time.sleep(2)
# 4. Result
out = requests.get(f"{BASE}/generations/{gid}", headers=H).json()
print(out["outputs"])Credits & Wallet
Every generation spends credits from your wallet. Creating a job fails with 402 if your balance is too low.
| Generation type | Cost (credits) |
|---|---|
| text | 2 |
| voice | 3 |
| image | 5 |
| music | 8 |
| infographic | 10 |
| video | 15 |
Costs are indicative and may vary by model.
Errors & Limits
The API uses standard HTTP status codes. Error responses contain a detail message.
| Code | Meaning |
|---|---|
| 200 / 201 | Success |
| 400 | Bad request — invalid or missing fields |
| 401 | Missing or invalid bearer token |
| 402 | Insufficient credits |
| 404 | Resource not found |
| 429 | Rate limited — slow down |
| 500 / 502 | Server or upstream model error |
{ "detail": "Insufficient credits" }Need integration help?
For API keys, enterprise, or white-label integrations, reach out to our team.