Skip to main content
POST
/
generate
/
k
/
gpt-image-2-image-to-image
GPT Image 2 Image-to-Image
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/gpt-image-2-image-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input_urls": [
    "https://media.sinancode.com/examples/gpt-image-2/input.png"
  ],
  "prompt": "take a photo with Sam Altman in the conference room",
  "aspect_ratio": "auto",
  "nsfw_checker": true,
  "resolution": "1K"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sinancode.com/llms.txt

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

Edit images using OpenAI’s GPT Image 2 model. Key Features:
  • Image Editing - Provide one or more input images (max 30MB each, jpeg/png/webp/jpg)
  • Long Prompts - Supports prompts up to 20000 characters
  • Multiple Aspect Ratios - Auto, 1:1, 5:4, 9:16, 21:9, 16:9, 4:3, 3:2, 4:5, 3:4, 2:3
  • High Resolution - Supports 1K / 2K / 4K output
  • NSFW Filter - Optional NSFW content check (enabled by default)

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

input_urls
string[]
required

Input image URL list (required, max 30MB, supports jpeg/png/webp/jpg)

Minimum array length: 1
Example:
[
"https://media.sinancode.com/examples/gpt-image-2/input.png"
]
prompt
string
required

Prompt (required, max 20000 characters)

Required string length: 1 - 20000
Example:

"take a photo with Sam Altman in the conference room"

aspect_ratio
enum<string>
default:auto

Aspect ratio (optional, default auto)

Available options:
auto,
1:1,
5:4,
9:16,
21:9,
16:9,
4:3,
3:2,
4:5,
3:4,
2:3
Example:

"auto"

nsfw_checker
boolean
default:true

NSFW check (optional, default true)

Example:

true

resolution
enum<string>
default:1K

Resolution (optional, default 1K)

Available options:
1K,
2K,
4K
Example:

"1K"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"