Skip to main content
POST
/
v1
/
midjourney
/
generations
/
variation
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/variation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
    "index": 3,
    "speed": "turbo"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/variation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
    "index": 3,
    "speed": "turbo"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
Creates a subtle variation (varySubtle, equivalent to V1–V4) from one tile of an Imagine grid. For a strong variation see High Variation.
ItemValue
actionVARIATION
Billingmidjourney@variation[-speed]
Requiredtask_id + index, or task_id + custom_id
Optionalspeed, metadata

Parameters

FieldDescription
task_idOriginal task ID returned by this platform (must be SUCCESS)
index14, maps to V1V4; one of index / custom_id
custom_idButton ID for the corresponding action; when set, index auto-matching is skipped
speedrelax / fast / turbo
metadataCustom metadata

Request example

{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "index": 3,
  "speed": "turbo"
}

Response

Submission returns a new local task_id. Poll GET /v1/tasks/{task_id}; on SUCCESS the result includes a new grid grid_image_url plus four image_urls:
{
  "id": "task_xxx",
  "status": "SUCCESS",
  "action": "VARIATION",
  "grid_image_url": "...",
  "image_urls": ["...", "...", "...", "..."]
}
version / niji from the source task are inherited automatically (affects billing fallback). To price by speed, configure midjourney@variation-fast / midjourney@variation-turbo.

Notes

  • The parent task must be in SUCCESS state, otherwise it returns 400 (task is not in SUCCESS state).
  • index must be 14; custom_id and index are mutually exclusive.
  • Defaults to varySubtle (subtle variation); for a strong variation use High Variation; Low Variation is the same action with a different billing key and identical behavior.