Verify that API authentication and connectivity are working.
Health Check
Use GET /ping to verify that your API key, API version header, and network path are
working before you run model or generation requests.
Request
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"
}Troubleshooting
| Symptom | Check |
|---|---|
401 Unauthorized | Confirm Authorization: Bearer <YOUR_API_KEY> is present and valid. |
400 or 404 | Confirm the base URL is https://developer.photogptai.com/api. |
| Version errors | Confirm API-Version: 1 is included. |
| Network failure | Check outbound HTTPS access from your environment. |