Reference · Authentication
Photta API authentication one key, one header
In one sentence
Send your key as `Authorization: Bearer photta_live_xxx` on every Photta API call. Keys are created in the dashboard, carry no per-endpoint scope, and share one credit balance.
- Authentication: Bearer key
- Limits: 600 requests/min
- Processing: async, polling
Every figure on this page comes from the Photta API docs · checked
What the API expects
Authentication at a glance
- Header
- Authorization: Bearer photta_live_xxx
- Key prefix
- photta_live_
- Base URL
- https://api.photta.app/api/v1
- Where keys are created
- https://ai.photta.app
- Scope
- One key reaches every endpoint and one credit balance
Check a key in one call
The account endpoint is free, so it is the safe way to confirm a key works.
curl https://api.photta.app/api/v1/account \
-H "Authorization: Bearer $PHOTTA_API_KEY"const res = await fetch("https://api.photta.app/api/v1/account", {
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}` },
});
const { data } = await res.json();import os, requests
res = requests.get(
"https://api.photta.app/api/v1/account",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
)
data = res.json()["data"]Handling keys
Rotate on suspicion
The documentation is explicit: rotate a key immediately if you suspect it has been compromised. Generate the replacement first, deploy it, then retire the old one.
Keep it on the server
A key that reaches a browser reaches everyone who opens the page. Call the API from your backend and pass results to the client.
401 means the key, not the request
A missing, invalid or expired key returns `authentication_error`. Check the header for typos and stray whitespace before looking anywhere else.
One balance behind every key
Keys are not scoped per capability. Several keys for several environments still spend the same credit balance, which GET `/api/v1/account` reports.
Questions about authentication
How do I authenticate a request?
Send the key in the Authorization header as a bearer token on every call. There is no separate login or token-exchange step.
Where do I create a key?
In your Photta dashboard. The same place issues replacements, which is what the documentation points you to after a 401.
Can I call the API from the browser?
Not with your key. Anything shipped to a browser is readable by its visitors, so put the call behind your own server and forward the result.
What if a key leaks?
Rotate it immediately — generate a new key, deploy it, then delete the old one. Credits already spent cannot be recovered, so rotate first and investigate afterwards.
Endpoints and references
Capabilities
Virtual try-on API for apparel
REST API that places apparel on AI mannequins. Asynchronous, 1.5–4 minute generation, 5 credits at 2K, 6 at 4K. cURL, Node.js and Python examples.
ReadCapabilities
Jewelry try-on API for necklaces, rings, bracelets and earrings
Place necklaces, rings, bracelets and earrings on AI models via REST. 5 credits at 2K, close-up mannequins built-in, reflection-aware rendering from the Photta docs.
ReadCapabilities
Ghost mannequin API for hollow-man product photos
AI ghost mannequin endpoint. Remove the mannequin from a garment photo and preserve interior detail. 3D or flat-lay, batch processing, 4 credits at 2K.
ReadReference
First Photta image in under five minutes.
Sign up, generate an API key, run your first cURL call, poll until it completes, persist the result. Five steps, documented end-to-end.
ReadReference
Photta API pricing
What each Photta API endpoint costs in credits at 2K and 4K, how charging and refunds work, and which endpoints are free. No per-image money price.
ReadReference
Photta API rate limits
The Photta API rate limit, its window, the Retry-After header, the polling interval and the per-plan concurrency caps, all read from the API documentation.
ReadReference
Photta API errors
The full list of Photta API error types with their status codes, the shape of an error body, and which failures are worth retrying.
ReadReference
Photta API resource endpoints
List mannequins, poses, backgrounds, footwear and brand labels, upload your own, and read your credit balance. The lookups behind every generation.
Read
Every figure on this page comes from the Photta API docs · checked
Try the API in five minutes
Generate a Photta API key, paste the cURL snippet above, and you'll have your first on-model image before the coffee finishes brewing.
- Bearer key
- 600 requests/min
- async, polling