Generate Image
Generate images from text prompts using AI image generation models.
Endpoint
POST
/api/v1/jobsCreate a generate_image job
Supported Models
| Model | Credits | Notes |
|---|---|---|
gemini-image | 5 | Fast, high-quality generation |
grok-imagine | 8 | Creative and imaginative output |
Input Parameters
Request Body
| Name | Type | Description |
|---|---|---|
workflowrequired | string | "generate_image" |
input.promptrequired | string | Text description of the image to generate |
input.model | stringDefault: gemini-image | Model to use |
input.aspect_ratio | stringDefault: 1:1 | Aspect ratio (e.g., '16:9', '9:16', '1:1') |
webhookUrl | string | URL to receive completion notification |
Example Request
Create Image Job
curl -X POST https://vydra.ai/api/v1/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow": "generate_image",
"input": {
"prompt": "A cyberpunk cityscape at night with neon lights",
"model": "gemini-image",
"aspect_ratio": "16:9"
}
}'Example Response
Response (201 Created)json
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"status": "running",
"workflow": "generate_image",
"creditsCharged": 5,
"createdAt": "2026-01-26T12:00:00.000Z",
"_links": {
"self": "https://vydra.ai/api/v1/jobs/660e8400-e29b-41d4-a716-446655440001",
"status": "https://vydra.ai/api/v1/jobs/660e8400-e29b-41d4-a716-446655440001"
}
}