Skip to main content
POST
/
v1
/
midjourney
/
generations
/
pan
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/pan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQW0D3WJ2QYJP9E3H7GZ4D2R",
    "direction": "right",
    "speed": "fast"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/pan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task_id": "task_01KQW0D3WJ2QYJP9E3H7GZ4D2R",
    "direction": "right",
    "speed": "fast"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
Pan out in a direction on a single image after Upscale: the original stays at the edge and the new area is filled in. Pan can be chained (keep panning right) to stitch a panorama.
ItemValue
actionPAN
Billingmidjourney@pan[-speed]
Requiredtask_id + direction, or task_id + custom_id
Optionalindex, speed, metadata

Parameters

FieldDescription
task_idTask ID returned by this platform (must be an Upscale single-image task)
directionleft / right / up / down
custom_idOptional; button ID for the corresponding Pan action; when set, direction is not required
indexOptional (14); backend auto-converts to 0-based
speedrelax / fast / turbo
metadataOptional custom metadata
Auto matching uses customId substrings: pan_left, pan_right, pan_up, and pan_down.

Request example

{
  "task_id": "task_01KQW0D3WJ2QYJP9E3H7GZ4D2R",
  "direction": "right",
  "speed": "fast"
}

Notes

  • Version support: pan works only on v6 / v6.1 / v7 / niji 6; v5.2 and earlier FAIL (the MJ engine can’t run it), and v8 / v8.1 removed pan from the action panel (returns an “invalid generation request”).
  • If it returns This action requires an upscaled task..., you passed a grid task; call upscale first.
  • direction must be one of left / right / up / down.
  • Version metadata from the source task is inherited automatically. To price by speed, configure midjourney@pan-fast / midjourney@pan-turbo.

Response

On success you receive a new local task_id. Poll GET /v1/tasks/{task_id} for the result.