PhotoGPT Developers

Connect to the PhotoGPT API and send authenticated requests.

Getting Started

Use the PhotoGPT Developer API to manage models, upload image assets, start image or video generation jobs, and retrieve generated media.

Base URL

https://developer.photogptai.com/api

All endpoint paths in these docs are relative to this base URL.

Authentication

Every request must include a bearer API key and API version header.

const API_KEY = '<YOUR_API_KEY>'
const BASE_URL = 'https://developer.photogptai.com/api'

const headers = {
  Authorization: `Bearer ${API_KEY}`,
  'API-Version': '1',
}
import requests

API_KEY = "<YOUR_API_KEY>"
BASE_URL = "https://developer.photogptai.com/api"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "API-Version": "1",
}

First request

Run a health check before testing model or generation workflows.

const response = await fetch(`${BASE_URL}/ping`, {
  headers,
})

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

console.log(await response.json())
response = requests.get(f"{BASE_URL}/ping", headers=headers)
response.raise_for_status()

print(response.json())

Expected response:

{
  "message": "pong!",
  "status": "OK"
}

Response shape

Most successful API responses return useful data in result and include a top-level status.

const response = await fetch(`${BASE_URL}/models`, {
  headers,
})

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

const body = await response.json()
const models = body.result
response = requests.get(f"{BASE_URL}/models", headers=headers)
response.raise_for_status()

models = response.json()["result"]

Error responses include status: "NOK" and may include message, err, and result.

How the API fits together

Full endpoint list

Use the API Reference for generated request/response schemas, interactive parameter controls, and endpoint-level examples.

On this page