{"openapi":"3.0.3","info":{"title":"GenPBR API","version":"1.0.0","description":"GenPBR developer API for programmatic PBR texture generation. Authenticate generation calls with an X-API-Key (or Authorization: Bearer). Create keys yourself at the dashboard after a self-serve Starter or Pro checkout. GET /api/v1/health-check needs no API key. The browser sandbox at /generate needs no account for core resolutions."},"servers":[{"url":"https://genpbr.com"}],"tags":[{"name":"genpbr","description":"GenPBR PBR texture generation API"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Self-serve GenPBR API key from the dashboard."},"BearerAuth":{"type":"http","scheme":"bearer","description":"Same GenPBR API key sent as a bearer token."}}},"paths":{"/api/v1/generate-texture":{"post":{"operationId":"generate-texture","summary":"GenPBR Generate Texture","description":"Generate PBR textures (normal, metallic, roughness, AO) from a base image.","tags":["core","texture-generation"],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Textures generated successfully"},"400":{"description":"Bad Request. Invalid request body or missing required fields (baseImage, textureTypes)."},"401":{"description":"Unauthorized. Invalid or missing API key. Check that your X-API-Key header is correct."},"402":{"description":"Quota Exceeded. Monthly request limit reached. Upgrade your plan or wait for the next billing cycle."},"429":{"description":"Rate Limit Exceeded. Too many requests. Wait before retrying. Rate limits reset every minute."},"500":{"description":"Internal Server Error. An error occurred during texture generation. Please try again."}},"requestBody":{"required":true,"description":"Base64-encoded image data and texture types to generate.","content":{"application/json":{"schema":{"type":"object","required":["baseImage","textureTypes"],"properties":{"baseImage":{"type":"string","description":"Base64-encoded image data (with or without data URL prefix)"},"textureTypes":{"type":"array","items":{"type":"string","enum":["normal","metallic","roughness","ao"]},"description":"Array of texture types to generate"},"options":{"type":"object","properties":{"normalStrength":{"type":"number","minimum":0.1,"maximum":5,"default":5},"metallicIntensity":{"type":"number","minimum":0.1,"maximum":5,"default":0.8},"roughnessIntensity":{"type":"number","minimum":0.1,"maximum":5,"default":2},"aoIntensity":{"type":"number","minimum":0.1,"maximum":5,"default":2},"aoRadius":{"type":"number","minimum":1,"maximum":10,"default":12}}}}},"example":{"baseImage":"data:image/png;base64,iVBORw0KG...","textureTypes":["normal","metallic","roughness","ao"],"options":{"normalStrength":5,"metallicIntensity":0.8,"roughnessIntensity":2,"aoIntensity":2,"aoRadius":12}}}}}}},"/api/v1/generate-from-url":{"post":{"operationId":"generate-from-url","summary":"GenPBR Generate from URL","description":"Generate PBR textures from an image URL instead of base64. Reduces payload size and simplifies integration.","tags":["core","texture-generation"],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Textures generated successfully"},"400":{"description":"Failed to fetch image from URL. The provided URL could not be accessed or is not a valid image."},"401":{"description":"Unauthorized. Invalid or missing API key."},"402":{"description":"Quota Exceeded. Monthly request limit reached."},"429":{"description":"Rate Limit Exceeded. Too many requests. Wait before retrying."}},"requestBody":{"required":true,"description":"Image URL and texture types to generate.","content":{"application/json":{"schema":{"type":"object","required":["imageUrl","textureTypes"],"properties":{"imageUrl":{"type":"string","format":"uri","description":"Public URL to the image file"},"textureTypes":{"type":"array","items":{"type":"string","enum":["normal","metallic","roughness","ao"]}},"options":{"type":"object","properties":{"normalStrength":{"type":"number","default":5},"metallicIntensity":{"type":"number","default":0.8},"roughnessIntensity":{"type":"number","default":2},"aoIntensity":{"type":"number","default":2},"aoRadius":{"type":"number","default":12}}}}},"example":{"imageUrl":"https://example.com/image.png","textureTypes":["normal","metallic","roughness","ao"]}}}}}},"/api/v1/batch-generate-textures":{"post":{"operationId":"batch-generate-textures","summary":"GenPBR Batch Generate Textures","description":"Process multiple images in one request. Returns job ID for async processing. Perfect for bulk operations.","tags":["premium","batch","async"],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Batch processing started"},"400":{"description":"Batch size exceeds limit. Starter: max 10 images, Pro/Founder: max 50 images"},"402":{"description":"Insufficient quota. Not enough quota for the entire batch. Check required vs available quota."},"403":{"description":"Plan not eligible. Batch processing is available for Starter, Pro, and Lifetime Founder plans only."},"404":{"description":"Job not found. The job ID does not exist or has expired."}},"requestBody":{"required":true,"description":"Array of images and texture types to generate for each.","content":{"application/json":{"schema":{"type":"object","required":["images","textureTypes"],"properties":{"images":{"type":"array","items":{"type":"string"},"description":"Array of base64-encoded images","minItems":1,"maxItems":50},"textureTypes":{"type":"array","items":{"type":"string","enum":["normal","metallic","roughness","ao"]}},"options":{"type":"object","properties":{"normalStrength":{"type":"number","default":5},"metallicIntensity":{"type":"number","default":0.8},"roughnessIntensity":{"type":"number","default":2},"aoIntensity":{"type":"number","default":2},"aoRadius":{"type":"number","default":12}}}}},"example":{"images":["data:image/png;base64,...","data:image/png;base64,..."],"textureTypes":["normal","metallic","roughness","ao"]}}}}}},"/api/v1/generate-texture-async":{"post":{"operationId":"generate-texture-async","summary":"GenPBR Async Generate with Webhooks","description":"Generate textures asynchronously with webhook support. Perfect for large files and long-running jobs.","tags":["premium","async","webhooks"],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Job created and processing started"},"402":{"description":"Insufficient quota. Not enough quota for this request."},"403":{"description":"Plan not eligible. Async generation is available for Starter, Pro, and Lifetime Founder plans only."},"404":{"description":"Job not found. The job ID does not exist or has expired."}},"requestBody":{"required":true,"description":"Base image, texture types, and optional webhook URL.","content":{"application/json":{"schema":{"type":"object","required":["baseImage","textureTypes"],"properties":{"baseImage":{"type":"string"},"textureTypes":{"type":"array","items":{"type":"string","enum":["normal","metallic","roughness","ao"]}},"options":{"type":"object"},"webhookUrl":{"type":"string","format":"uri","description":"Optional webhook URL to receive completion notification"}}},"example":{"baseImage":"data:image/png;base64,...","textureTypes":["normal","metallic","roughness","ao"],"webhookUrl":"https://your-app.com/webhook"}}}}}},"/api/v1/upscale-texture":{"post":{"operationId":"upscale-texture","summary":"GenPBR Upscale Texture","description":"Upscale generated textures 2x or 4x using high-quality bicubic interpolation.","tags":["premium","image-processing"],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Image upscaled successfully"},"400":{"description":"Scale factor must be 2 or 4. Only 2x and 4x upscaling are supported."},"402":{"description":"Quota Exceeded. Monthly request limit reached."},"403":{"description":"Plan not eligible. Upscaling is available for Starter, Pro, and Lifetime Founder plans only."}},"requestBody":{"required":true,"description":"Image to upscale and scale factor.","content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64-encoded image data"},"scaleFactor":{"type":"number","enum":[2,4],"default":2,"description":"Upscale factor (2x or 4x)"}}},"example":{"image":"data:image/png;base64,...","scaleFactor":2}}}}}},"/api/v1/usage-stats":{"get":{"operationId":"usage-stats","summary":"GenPBR Usage Statistics","description":"Get real-time quota, usage history, and rate limit status programmatically.","tags":["monitoring","analytics"],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Usage statistics retrieved successfully"},"401":{"description":"Unauthorized. Invalid or missing API key."}}}},"/api/v1/health-check":{"get":{"operationId":"health-check","summary":"GenPBR Health Check","description":"Check API health status, queue status, and estimated wait times. No authentication required.","tags":["monitoring","public"],"security":[],"responses":{"200":{"description":"API is healthy"},"503":{"description":"Service Unavailable. API is experiencing issues. Check services.status for details."}}}}}}