Skip to main content
POST
/
v1
/
images
/
edits
Image Edits
curl --request POST \
  --url https://api.gravitex.ai/v1/images/edits \
  --header 'Authorization: <authorization>'

Documentation Index

Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt

Use this file to discover all available pages before exploring further.

Introduction

POST /v1/images/edits is the OpenAI-compatible image editing endpoint. Supported models include:
  • Qwen: qwen-image-edit-plus — see Qwen Image
  • GPT-Image-2: JSON or multipart/form-data
Text-to-image uses POST /v1/images/generations. GPT-Image-2 can also use generations with an image field — see GPT-Image-2.

Authentication

Authorization
string
required
Bearer Token, e.g. Bearer sk-xxxxxxxxxx

Request examples

curl -X POST "https://api.gravitex.ai/v1/images/edits" \
  -H "Authorization: Bearer sk-xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "Change background to beach sunset",
    "image": "https://example.com/photo.png",
    "size": "1024x1024",
    "quality": "high"
  }'
See Image generation for model-specific details.