Skip to content

GPT Image 1.5 ​

gpt-image-1.5 is useful when prompt adherence, text rendering, clean composition, or commercial image output quality matter. It uses the same OpenAI-compatible image fields as the other Pixapi image models.

API surface ​

OperationEndpointMode
Image generationPOST /v1/images/generationsSync
Image generation taskPOST /v1/async/images/generationsAsync
Image editingPOST /v1/images/editsSync
Image editing taskPOST /v1/async/images/editsAsync

Model id ​

Model idBest for
gpt-image-1.5GPT Image generation and editing with strong prompt adherence.

Pricing ​

GPT Image 1.5 supports 1K output sizes only (1024x1024, 1536x1024, 1024x1536, or size=auto). Credits vary by quality. quality=auto is billed as high. For 2K or 4K outputs, use gpt-image-2.

Size tierSupported sizeslowmediumhigh / auto
1K1024x1024, 1536x1024, 1024x1536, auto1414

The displayed costCredits for a request equals the matrix value times n.

Request fields ​

Send the common fields at the top level. Put the model-specific controls listed below inside providerOptions.

FieldTypeRequiredDescription
modelstringYesgpt-image-1.5. Case-sensitive model ID.
promptstringYesDescribe the subject, composition, style, and requested edits. Pixapi keeps the first 2,000 characters; provide a non-empty prompt for both generation and editing.
nintegerNoDefault 1; only integer 1 is supported.
sizestringNoauto (default), 1024x1024, 1536x1024, or 1024x1536. GPT Image 1.5 supports the 1K tier only; do not request 2K/4K.
imagestring / string[]For editsPublic HTTP(S) image URL or URL array; required on /images/edits. Up to 14 URLs; Base64 input is not supported.
qualitystringNoauto (default), low, medium, or high. Higher quality can take longer.
providerOptionsobjectNoModel-specific options; see the table below.

providerOptions ​

All fields in this table are nested inside providerOptions, not alongside model.

FieldTypeDescription
output_formatstringOutput image format: png (default, keeps transparency), jpeg (smaller files, no alpha), or webp (supports transparency).
backgroundstringBackground mode: auto (default), opaque, or transparent. transparent can only be combined with output_format: "png" or output_format: "webp"; JPEG does not support an alpha channel.
moderationstringContent moderation strictness: auto (default) or low (more permissive).
output_compressionintegerOutput compression level 0–100; applies only to jpeg and webp output.
mask_urlstringPublic PNG mask URL for inpainting. Requires image; dimensions must match the first image. Transparent pixels mark the area to edit. Use a PNG with an alpha channel, under 4 MB.
nsfw_checkbooleanOptional prompt/image moderation; default false.

Input rules ​

Pixapi accepts one output and up to 14 reference images. Output pixels are selected with size.

Generate example ​

bash
curl https://api.pixapi.ai/v1/images/generations \
  -H "Authorization: Bearer $PIXAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-1.5",
    "prompt": "A polished launch visual for a developer API product",
    "n": 1,
    "size": "1024x1024"
  }'
py
import os
import requests

response = requests.post(
    "https://api.pixapi.ai/v1/images/generations",
    headers={
        "Authorization": f"Bearer {os.environ['PIXAPI_KEY']}",
        "Content-Type": "application/json",
    },
    json={
    "model": "gpt-image-1.5",
    "prompt": "A polished launch visual for a developer API product",
    "n": 1,
    "size": "1024x1024"
},
)
response.raise_for_status()
print(response.json())
js
const response = await fetch('https://api.pixapi.ai/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PIXAPI_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "model": "gpt-image-1.5",
  "prompt": "A polished launch visual for a developer API product",
  "n": 1,
  "size": "1024x1024"
}),
});

if (!response.ok) {
  throw new Error(await response.text());
}

console.log(await response.json());
go
package main

import (
  "bytes"
  "fmt"
  "io"
  "net/http"
  "os"
)

func main() {
  body := []byte(`{
  "model": "gpt-image-1.5",
  "prompt": "A polished launch visual for a developer API product",
  "n": 1,
  "size": "1024x1024"
}`)

  req, err := http.NewRequest(
    "POST",
    "https://api.pixapi.ai/v1/images/generations",
    bytes.NewBuffer(body),
  )
  if err != nil {
    panic(err)
  }
  req.Header.Set("Authorization", "Bearer "+os.Getenv("PIXAPI_KEY"))
  req.Header.Set("Content-Type", "application/json")

  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    panic(err)
  }
  defer resp.Body.Close()

  result, _ := io.ReadAll(resp.Body)
  fmt.Println(string(result))
}

Edit example ​

bash
curl https://api.pixapi.ai/v1/images/edits \
  -H "Authorization: Bearer $PIXAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-1.5",
    "prompt": "Replace the background with a bright studio setup",
    "image": "https://cdn.example.com/input.png",
    "n": 1,
    "size": "1024x1024"
  }'
py
import os
import requests

response = requests.post(
    "https://api.pixapi.ai/v1/images/edits",
    headers={
        "Authorization": f"Bearer {os.environ['PIXAPI_KEY']}",
        "Content-Type": "application/json",
    },
    json={
    "model": "gpt-image-1.5",
    "prompt": "Replace the background with a bright studio setup",
    "image": "https://cdn.example.com/input.png",
    "n": 1,
    "size": "1024x1024"
},
)
response.raise_for_status()
print(response.json())
js
const response = await fetch('https://api.pixapi.ai/v1/images/edits', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PIXAPI_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "model": "gpt-image-1.5",
  "prompt": "Replace the background with a bright studio setup",
  "image": "https://cdn.example.com/input.png",
  "n": 1,
  "size": "1024x1024"
}),
});

if (!response.ok) {
  throw new Error(await response.text());
}

console.log(await response.json());
go
package main

import (
  "bytes"
  "fmt"
  "io"
  "net/http"
  "os"
)

func main() {
  body := []byte(`{
  "model": "gpt-image-1.5",
  "prompt": "Replace the background with a bright studio setup",
  "image": "https://cdn.example.com/input.png",
  "n": 1,
  "size": "1024x1024"
}`)

  req, err := http.NewRequest(
    "POST",
    "https://api.pixapi.ai/v1/images/edits",
    bytes.NewBuffer(body),
  )
  if err != nil {
    panic(err)
  }
  req.Header.Set("Authorization", "Bearer "+os.Getenv("PIXAPI_KEY"))
  req.Header.Set("Content-Type", "application/json")

  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    panic(err)
  }
  defer resp.Body.Close()

  result, _ := io.ReadAll(resp.Body)
  fmt.Println(string(result))
}

Response ​

json
{
  "created": 1766880000,
  "data": [
    {
      "url": "https://cdn.pixapi.ai/generated/gpt-image-1.5.png"
    }
  ]
}