PhotoGPT Developers

Explore the PhotoGPT Developer API by workflow and endpoint group.

API Reference

The PhotoGPT Developer API is a bearer-token API for model management, image generation, video generation, asset management, and asynchronous job polling.

Use the workflow guides for implementation context. Use this API Reference when you need exact request bodies, response schemas, parameters, and generated examples.

Base URL

Use https://developer.photogptai.com/api for production requests. Send your API key in the Authorization header and include API-Version: 1 with every request.

Guides

Endpoint groups

Request pattern

Most endpoints return their useful payload in result. Generation requests return a jobId; poll GET /jobs/{id} to read the latest status and completed outputs. The training endpoint is documented as returning a success string, so track training readiness through GET /models/{modelID}.

const response = await fetch('https://developer.photogptai.com/api/images/generation', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <YOUR_API_KEY>',
    'API-Version': '1',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    modelID: 'gpt-image-2',
    prompt: 'A cinematic product photo of a silver perfume bottle',
    aspectRatio: '1:1',
    numImages: 1,
    options: {
      openai: {
        imageSize: '1K',
        outputFormat: 'jpeg',
        quality: 'high',
      },
    },
  }),
})

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

const body = await response.json()
const jobId = body.result.jobId
import requests

payload = {
    "modelID": "gpt-image-2",
    "prompt": "A cinematic product photo of a silver perfume bottle",
    "aspectRatio": "1:1",
    "numImages": 1,
    "options": {
        "openai": {
            "imageSize": "1K",
            "outputFormat": "jpeg",
            "quality": "high",
        },
    },
}

response = requests.post(
    "https://developer.photogptai.com/api/images/generation",
    headers={
        "Authorization": "Bearer <YOUR_API_KEY>",
        "API-Version": "1",
    },
    json=payload,
)
response.raise_for_status()

job_id = response.json()["result"]["jobId"]
curl -X POST "https://developer.photogptai.com/api/images/generation" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "API-Version: 1" \
  -H "Content-Type: application/json" \
  -d '{
    "modelID": "gpt-image-2",
    "prompt": "A cinematic product photo of a silver perfume bottle",
    "aspectRatio": "1:1",
    "numImages": 1,
    "options": {
      "openai": {
        "imageSize": "1K",
        "outputFormat": "jpeg",
        "quality": "high"
      }
    }
  }'

Browse the schema

The sidebar groups generated OpenAPI routes by their API tag. Browse the sidebar for every operation in the current schema, including request bodies, response bodies, authentication requirements, and code samples.

On this page