OpenAPI reference

v1
Manage API Key

Create image and video tasks, inspect model capabilities, and retrieve generated results with the REST API. The public interface is fixed at v1.

Quickstart

Every /openapi/v1/* endpoint uses API Key authentication. Send a Bearer Token in the request header and never call it directly from browser code.

Base URL
https://open-api.mavowow.com
Authorization
Bearer fa_live_...
Idempotency: Image and video requests require an 8–128 character Idempotency-Key using letters, digits, periods, underscores, colons, or hyphens. Reuse it for timeout or 5xx retries.

Image generation

POST/openapi/v1/images/generations

Each request creates one image task; the public endpoint fixes count=1.

model
Required image model ID.
mode
Required workflow mode: use generate for text-to-image, or edit when submitting image_urls for editing or reference generation.
prompt
Required; at least three non-whitespace characters.
count
Fixed at 1.

Task queries

201 Created with data.status set to queued means the task was created and entered the queue; it is not an error. Save data.id, then poll the Location URL or the task endpoint for the result.

Minimal image generation request
curl -X POST 'https://open-api.mavowow.com/openapi/v1/images/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: image-order-20260714-0001' \
  -d '{
    "model": "gemini-2.5-flash-image",
    "mode": "generate",
    "prompt": "A product photo in soft daylight",
    "count": 1
  }'
201 Created
{ "data": { "id": "<TASK_ID>", "status": "queued" } }
Successful creation: 201 Created with data.status set to queued means the task was created and entered the queue; it is not an error. Save data.id, then poll the Location URL or the task endpoint for the result.

Model catalog

Models and capabilities change over time. Read the catalog first instead of hard-coding the full model set.

GET/openapi/v1/models

Returns image and video models plus supported sizes, ratios, durations, resolutions, and other capabilities.

Model catalog request language
curl 'https://open-api.mavowow.com/openapi/v1/models' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Image generation

Each request creates one image task; the public endpoint fixes count=1.

POST/openapi/v1/images/generations

Common request fields

model
Required image model ID.
mode
Required workflow mode: use generate for text-to-image, or edit when submitting image_urls for editing or reference generation.
prompt
Required; at least three non-whitespace characters.
count
Fixed at 1.
image_urls
Required in edit or reference-image mode; must be a public HTTPS URL accessible to the model.
aspect_ratio
Optional image aspect ratio.
size / resolution
Optional image size or resolution.size is used by GPT Image 2, Nano Banana, Seedream, Qwen Image 2.0, Wan, and Kling; resolution is used by Grok Imagine.
Image-edit request
curl -X POST 'https://open-api.mavowow.com/openapi/v1/images/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: image-edit-20260714-0001' \
  -d '{
    "model": "gemini-2.5-flash-image",
    "mode": "edit",
    "prompt": "Keep the subject and use a studio background",
    "count": 1,
    "image_urls": ["https://cdn.example.com/input.jpg"],
    "aspect_ratio": "16:9"
  }'

Video generation

Supports text-to-video, image-to-video, and selected video editing capabilities.

POST/openapi/v1/videos/generations

Common request fields

model
Required video model ID.
video_mode
Required video mode, such as t2v, i2v_first, multimodal_ref, or v2v_edit; it must be supported by the model.
prompt
Required; at least three non-whitespace characters.
image_urls
Optional first frame, last frame, or reference images.
source_video_url
Optional source video for editing or extension.
duration
Optional supported model duration.
resolution
Optional, for example 720p.
ratio / aspect_ratio
Optional video ratio.ratio is used by Seedance and HappyHorse; aspect_ratio by Grok Video, Kling Video, and HappyHorse.
Video generation request language
curl -X POST 'https://open-api.mavowow.com/openapi/v1/videos/generations' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: video-order-20260714-0001' \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "video_mode": "t2v",
    "prompt": "A slow push through a city at night",
    "duration": 10,
    "resolution": "720p",
    "ratio": "16:9"
  }'

Task queries

A new task returns 201 Created; idempotent replay returns the original task and 200 OK. Response headers include Location and Idempotent-Replayed.

  • queuedQueued
  • processingProcessing
  • succeededSucceeded
  • failedFailed
  • canceledCanceled
GET/openapi/v1/tasks/{task_id}

Read one OpenAPI task for the current account. On success, obtain image or video URLs from output.

Task status query
curl 'https://open-api.mavowow.com/openapi/v1/tasks/TASK_ID' \
  -H 'Authorization: Bearer YOUR_API_KEY'
GET/openapi/v1/tasks

Query tasks with cursor pagination. Account-level task reads are limited to 120 per minute.

limit
Items per page.
cursor
Cursor returned by the previous page.
type
image or video.
status
queued, processing, succeeded, failed, or canceled.

Error handling

Every public API error contains error.code, message, and request_id. Provide request id and task id to support—never the full API Key.

  • 400
    invalid_request / invalid_media_url

    Correct parameters or media URLs; do not retry unchanged.

  • 401
    invalid_api_key

    Check whether the key is missing, regenerated, or revoked.

  • 402
    insufficient_points / membership_required

    Add points or upgrade the required membership.

  • 404
    task_not_found

    Verify the task ID and owning account.

  • 409
    idempotency_key_reused

    Use a new key for a different request; retry later if processing.

  • 422
    validation_error

    Correct request fields using details.

  • 429
    rate_limit / concurrent_limit

    Follow Retry-After or wait for existing tasks.

  • 5xx
    internal_error / service_unavailable

    Retry with backoff and keep the original idempotency key.

Model pricing

OpenAPI and the web app share the current Mavowow account's credit balance, membership benefits, and active discounts. Credits are deducted from the same account after a task is created; an insufficient balance returns 402 and no task is created.

Image models

Image tasks are charged per image. Size and quality affect consumption for selected models.

GPT Image 2.5 Flare

gpt-image-2.5-flare
Current billing rate 50%
Credit consumption details
ConfigurationCredit consumption
Low · 1KOriginal price:40;Discounted price:20。credits / image
Low · 2KOriginal price:60;Discounted price:30。credits / image
Low · 4KOriginal price:100;Discounted price:50。credits / image
Medium · 1KOriginal price:80;Discounted price:40。credits / image
Medium · 2KOriginal price:140;Discounted price:70。credits / image
Medium · 4KOriginal price:240;Discounted price:120。credits / image
High · 1KOriginal price:280;Discounted price:140。credits / image
High · 2KOriginal price:540;Discounted price:270。credits / image
High · 4KOriginal price:900;Discounted price:450。credits / image
xhigh · 1KOriginal price:480;Discounted price:240。credits / image
xhigh · 2KOriginal price:960;Discounted price:480。credits / image
xhigh · 4KOriginal price:1,600;Discounted price:800。credits / image
max · 1KOriginal price:1,060;Discounted price:530。credits / image
max · 2KOriginal price:2,160;Discounted price:1,080。credits / image
max · 4KOriginal price:3,560;Discounted price:1,780。credits / image
auto · 1KOriginal price:1,060;Discounted price:530。credits / image
auto · 2KOriginal price:2,160;Discounted price:1,080。credits / image
auto · 4KOriginal price:3,560;Discounted price:1,780。credits / image

Video models

Video tasks are charged by generated duration. The table uses the model configuration and production cost calculator to show the actual cost of each model's default 5-second task; resolution, audio, and video-input mode affect the final cost.

Grok Video

grok-video-3
Credit consumption details
ConfigurationCredit consumption
Base generation · 480p · 5 seconds500credits / task
Base generation · 720p · 5 seconds750credits / task

Frequently asked questions

The Mavowow API reference documents available endpoints, request parameters, response structures and error codes, updated with releases. Build against the current reference content.