apimaxDocs
DocsPricingConsole
API ReferenceIntegration GuideUser GuideChangelog

Music Series

Image Series

POSTMuse Image Generation

Video series

Task Management

Error Code ReferenceQuery Task StatusGET

Account Management

Query Quota UsageGET

Docs / Image Series / Muse

MusePOSTmuse-image

Muse Image Generation

Call Muse Image through the official OpenAI synchronous Images API with text-to-image and editing (JSON references or multipart uploads, up to 10 reference images), billed per generated image.

POSThttps://api.apimax.ai/v1/images/generations
Try it
Bearer API KeyJSONServer-side call

Overview#

Muse Image is a Muse-series image generation model. It is called through the official OpenAI synchronous Images API: requests use the OpenAI Images format, the call blocks until generation finishes, and the images are returned inline with no task polling. Text-to-image and image editing / multi-image composition are supported.

The public model name for this page is muse-image. Billing is per generated image; see the platform Model Pricing page for the unit price.

API#

http
POST /v1/images/generations

Requests must carry an API key:

http
Authorization: Bearer <token>
Content-Type: application/json

Text-to-image#

cURL
curl --request POST \
  --url https://api.apimax.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "muse-image",
    "prompt": "A red paper boat on a calm blue lake, watercolor style",
    "n": 1,
    "size": "1024x1024",
    "response_format": "url"
  }'

Image editing / composition#

POST /v1/images/edits accepts reference images in two ways.

A JSON body with an images array whose entries are image URL strings, {"url": ...} or {"image_url": ...} objects, or {"file_id": ...}:

json
{
  "model": "muse-image",
  "prompt": "Add a red knitted hat to the character and keep the background unchanged",
  "images": [
    "https://example.com/subject.png",
    { "url": "https://example.com/scene.jpg" }
  ],
  "n": 1
}

Or an OpenAI-compatible multipart form with image or image[N] file fields, up to 10 reference images of at most 10 MiB each:

cURL
curl --request POST \
  --url https://api.apimax.ai/v1/images/edits \
  --header 'Authorization: Bearer <token>' \
  --form 'model=muse-image' \
  --form 'prompt=Add a red knitted hat to the character and keep the background unchanged' \
  --form 'image=@./input.png'

Request fields#

Parameters follow the official OpenAI Images API:

FieldTypeRequiredDescription
modelstringYesFixed as muse-image
promptstringYesDescription of the image content and style
nintegerNoNumber of images, 1-10, default 1
sizestringNoWIDTHxHEIGHT pixel string (2-5 digits per side), e.g. 1024x1024, 1280x720, 720x1280, 1280x960; upstream default canvas when omitted
response_formatstringNourl or b64_json, default url
images(string\object)[]NoReference images for edits, at most 10; entries are URL strings, {url} / {image_url} objects, or {file_id}

This model does not support mask, quality, resolution, aspect_ratio, or streaming requests; sending them returns 400.

Response#

The API answers synchronously in the OpenAI Images format:

200
{
  "created": 1794000000,
  "data": [
    {
      "url": "https://example.com/generated-image.png",
      "revised_prompt": "A red paper boat on a calm blue lake, watercolor style"
    }
  ]
}

With response_format set to b64_json, data[].b64_json carries the Base64 image data directly.

Billing#

Billed per generated image. The requested n is pre-held at submission and settled by the actual number of returned images; failed requests are not charged; see the platform Model Pricing page for the unit price.

Common errors#

HTTPDescription
400Missing or invalid parameter, e.g. n outside 1-10, unsupported size, or an unsupported field such as quality; or generation failed (including content rejected by upstream moderation)
401API key missing or invalid
403API key has no access to this model, or the account balance is insufficient
429Rate or quota limit reached
502 / 503Upstream returned an error or is temporarily unavailable; 503 also means no channel is available for this model in your group (for example a misspelled model name)
504Timed out waiting for the synchronous generation. The task is not cancelled: it keeps running in the background and is billed by its actual result

Next steps

All docs
Relink Audio URLsSynchronously fetch ready-to-use audio URLs by Suno clip_id.Upsample Style TagsPolish and expand style tags and lyrics into a fuller style description.Get Style Inspiration SuggestionsGet random style or inspiration suggestions from the Suno upstream.Method 1: Create a Voice from an Existing SongCreate a vocal voice directly from a song clip already generated in this pool.Upload AudioImport user audio as a Suno-owned clip; returns an async upload task ID. With copyright=true the request switches to the copyright pipeline.Query Quota UsageUse an API key to query the remaining credits, used credits, and unlimited-quota status of the current key and its owning user.
On this page
OverviewOverviewAPIText-to-imageImage editing / compositionRequest fieldsResponseBillingCommon errorsNext steps
API

POST /v1/images/generations