Public API
PLAYTEX API
Automate PBR map, AI texture, and image-to-texture generation with scoped API keys,
async jobs, signed outputs, rate limits, and shared PLAYTEX generation credits.
API access is available to signed-in accounts. Create keys from
Profile > API, then use Bearer auth with the
Supabase Edge Function endpoint for your PLAYTEX project.
How API billing works
Generation jobs reserve credits when accepted. Monthly generation credits are used first,
then add-on balance. Successful jobs settle to the actual output count when fewer outputs
are produced, and failed worker jobs refund reserved credits.
- PBR map job: 1 credit per job.
- AI texture job: 1 credit per variation.
- Image-to-texture job: 1 credit per output.
- GET /v1/jobs/{id} and GET /v1/usage are rate-limited but do not consume generation credits.
Async generation flow
- Create a job with POST /v1/pbr-map-jobs, POST /v1/ai-texture-jobs, or POST /v1/image-to-texture-jobs.
- Receive a 202 response with id, poll_url, estimated_credits, and credits_reserved.
- Poll GET /v1/jobs/{id} until the job succeeds or fails.
- Download signed output URLs from completed job responses.
Endpoints
- POST /v1/pbr-map-jobs creates a PBR map stack job.
- POST /v1/ai-texture-jobs creates an AI texture job.
- POST /v1/image-to-texture-jobs creates an image-to-texture job and accepts top-level variationCount.
- GET /v1/jobs/{id} returns status, progress, outputs, errors, and usage settlement details.
- GET /v1/usage returns key limits, wallet credits, reset date, and credit-cost metadata.
OpenAPI and worker runtime
The OpenAPI contract is published at /openapi.yaml.
Production generation is processed by the persistent Node worker command
npm run api:worker, deployed to a long-lived runtime rather than Vercel serverless.