Create Generation V2
AI Generation
Create Generation
POST
Create Generation V2
Create a new AI-powered image generation request. Upload 1-5 example images and provide instructions to generate new images based on your examples. Uses Replicate AI’s Stability AI SDXL model for high-quality results.Documentation Index
Fetch the complete documentation index at: https://devkit4ai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Requires valid JWT token withend_user role and project-scoped headers.
Headers
Bearer JWT access token obtained from login
Must be set to
end_userDeveloper key associated with the project
Project UUID for project-scoped access
Project API key for authentication
Must be
multipart/form-data for file uploadsRequest Body (Multipart Form Data)
Array of 1-5 example images to guide generation. Supported formats: JPEG, PNG, WebP. Maximum 10MB per image.
JSON-encoded string containing generation instructions. Must be between 1-1000 characters when serialized.Example:
{"prompt": "Generate a futuristic cityscape with neon lights"}Response
Unique UUID identifier for the generation request
Initial status: always
pending for new requestsConfirmation message: “Generation request submitted successfully”
Example Request
Example Response
Generation Status Lifecycle
After submission, the generation progresses through multiple states:- pending - Request queued for processing
- processing - AI model actively generating image
- completed - Generation successful, image available
- failed - Generation failed due to error
Image Requirements
File Formats
- Supported: JPEG (
.jpg,.jpeg), PNG (.png), WebP (.webp) - Unsupported: GIF, TIFF, BMP, SVG
File Size
- Maximum per image: 10MB
- Total request size: 50MB (5 images × 10MB each)
Image Count
- Minimum: 1 example image required
- Maximum: 5 example images allowed
- Recommended: 3-5 images for best results
Image Quality
For best generation results:- Use high-resolution images (1024x1024 or higher)
- Ensure images are well-lit and in focus
- Provide diverse examples showing different angles/styles
- Avoid heavily compressed or low-quality images
Instructions Format
Theinstructions field must be a JSON-encoded string with the following constraints:
Structure:
- Must be valid JSON
- Serialized length: 1-1000 characters
- Must contain at least a
promptkey - Other keys are optional and passed to AI model
Processing Time
Typical generation times:- Fast: 1-2 minutes (simple generations)
- Average: 2-5 minutes (standard complexity)
- Slow: 5-10 minutes (complex or high-detail generations)
Poll the Generation Status endpoint every 10-15 seconds to check for completion. Avoid polling more frequently to minimize API usage.
Use Cases
Portfolio Website
Generate custom images for your portfolio projects:E-Commerce Product Variations
Create product variations for online stores:Content Creation Platform
Build a content creation tool with AI generation:Error Responses
Missing Example Images (422)
Too Many Images (422)
File Too Large (413)
Invalid File Format (422)
Invalid Instructions (422)
Instructions Too Long (422)
Unauthorized (401)
Insufficient Permissions (403)
Rate Limit Exceeded (429)
Rate Limits
AI generation endpoints have stricter rate limits due to computational cost:| Tier | Generations per Month | Concurrent Requests |
|---|---|---|
| Free Starter | 100 | 1 |
| Cloud Starter | 1,000 | 3 |
| Cloud Premium | Unlimited | 10 |
Related Pages
Get Generation Status
Check generation progress and results
List Generations
View all your generation requests
Toggle Public
Make generations public or private
Delete Generation
Remove generation requests
AI Generation Guide
Implement in Starter Kit
Quick Start
Complete generation tutorial
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

