Images

Create image edit

Changed on

Edit an Image

post/v2/router/images/edits

Request

  • Base URL
    https://my.orq.ai
  • URL
    https://my.orq.ai/v2/router/images/edits
  • Auth
    HTTP bearer

Request body multipart/form-data

modelstring required

The model to use for image edit. Check models

imagestring binary

The image(s) to edit. Must be a supported image file or an array of images. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.

promptstring required

A text description of the desired image(s).

nnumber nullable

The number of images to generate. Must be between 1 and 10.

sizestring nullable

The size of the generated images

quality'auto' | 'high' | 'medium' | 'low' | 'standard' | 'null' nullable

The quality of the image that will be generated. Auto will automatically select the best quality for the given model.

response_format'url' | 'b64_json'

The format in which the generated images are returned. Some of the models only return the image in base64 format.

userstring

A unique identifier representing your end-user, which can help to monitor and detect abuse.

namestring

The name to display on the trace. If not specified, the default system name will be used.

fallback_on_codesinteger[]

HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].

Example request

{
  "model": "openai/gpt-image-2",
  "retry": {
    "count": 3,
    "on_codes": [
      429,
      500,
      502,
      503,
      504
    ]
  },
  "cache": {
    "ttl": 3600
  },
  "load_balancer": {
    "models": [
      {
        "model": "openai/gpt-5.6-sol",
        "weight": 0.7
      }
    ]
  },
  "timeout": {
    "call_timeout": 30000
  },
  "orq": {
    "retry": {
      "count": 3,
      "on_codes": [
        429,
        500,
        502,
        503,
        504
      ]
    },
    "fallbacks": [
      {
        "model": "openai/gpt-5.4-mini"
      }
    ],
    "prompt": {
      "id": "prompt_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "version": "latest"
    },
    "identity": {
      "id": "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "display_name": "Jane Doe",
      "email": "jane.doe@example.com",
      "metadata": [
        {
          "department": "Engineering",
          "role": "Senior Developer"
        }
      ],
      "logo_url": "https://example.com/avatars/jane-doe.jpg",
      "tags": [
        "hr",
        "engineering"
      ]
    },
    "contact": {
      "id": "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "display_name": "Jane Doe",
      "email": "jane.doe@example.com",
      "metadata": [
        {
          "department": "Engineering",
          "role": "Senior Developer"
        }
      ],
      "logo_url": "https://example.com/avatars/jane-doe.jpg",
      "tags": [
        "hr",
        "engineering"
      ]
    },
    "cache": {
      "ttl": 3600
    },
    "load_balancer": {
      "type": "weight_based",
      "models": [
        {
          "model": "openai/gpt-4o",
          "weight": 0.7
        },
        {
          "model": "anthropic/claude-3-5-sonnet",
          "weight": 0.3
        }
      ]
    },
    "timeout": {
      "call_timeout": 30000
    }
  }
}

Response

Represents an image edit response from the API.

creatednumber required

The Unix timestamp (in seconds) of when the image was created.

output_formatstring

The output format of the image generation

sizestring

The size of the image generated

qualitystring

The quality of the image generated

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property /

    • info

      the request property default value changed from 1800 to 3600

    • info

      the request property default value changed from 1800 to 3600

    • info

      added the non-success response with the status

    • warning

      removed the request property

    • warning

      removed the request property /

    • info

      the request property default value changed from 3600 to 1800

    • info

      the request property default value changed from 3600 to 1800

    • info

      removed the non-success response with the status