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
Getting started
Set up headers, make the first request, and understand response shape.
Jobs
Poll asynchronous generation jobs and read completed outputs.
Image generation
Generate with trained models, public image models, and reference images.
Video generation
Generate videos, inspect records, and prepare downloads.
Endpoint groups
Image generation
Start image jobs with POST /images/generation.
Image upscaling
Start image upscaling jobs with POST /images/upscaling.
Video generation
Start video jobs with POST /videos/generation.
Job status
Poll asynchronous generation jobs until outputs are ready.
Model endpoints
List, create, inspect, train, and delete trained models.
Image endpoints
Upload model images, inspect image metadata, and delete image assets.
Video endpoints
List generated videos, inspect records, delete videos, and create download links.
System endpoints
Check API availability before running higher-cost workflows.
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.jobIdimport 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.