Skip to main content
POST
/
v1
/
midjourney
/
generations
/
reroll
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/reroll \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
    "speed": "fast"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/reroll \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
    "speed": "fast"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
Regenerate 4 images from the source task’s prompt (equivalent to the 🔄 button). The whole grid is re-rolled, so no index is needed.
ItemValue
actionREROLL
Billingmidjourney@reroll[-speed]
Requiredtask_id, or task_id + custom_id
Optionalspeed, metadata

Parameters

FieldDescription
task_idOriginal task ID returned by this platform
custom_idOptional; button ID for the corresponding reroll action
speedrelax / fast / turbo
metadataOptional custom metadata

Auto matching

The service finds a reroll-related button from the source task buttons that contains ::reroll::, or matches reroll emoji.

Request example

{
  "task_id": "task_01KQVZAPBW13W63DQNQZT7FCQK",
  "speed": "fast"
}

Error responses

HTTPcodedescription
4004task_id is required for reroll
4004task ... is not in SUCCESS state
4043task ... not found
5029Service rejected

Response

On success you receive a new local task_id. Poll GET /v1/tasks/{task_id}; on SUCCESS you get a fresh 2x2 grid with the same prompt. The source task’s prompt / version / niji / structured fields are inherited automatically (the seed may differ, so results differ). To price by speed, configure midjourney@reroll-fast / midjourney@reroll-turbo.

Notes

  • You can only reroll an imagine grid or a grid produced by reroll itself; you cannot reroll a task that already went through upscale / variation / pan, etc.
  • The parent task must be in SUCCESS state.