API Reference
Standard Image Generation
POST
https://api.soreal.app/create-image/standard
Description
Generate a new standard image based on a text prompt.
This endpoint requires 5 credits per image generated.
Parameters
Name | Type | Required | Default | Options | Description |
---|---|---|---|---|---|
prompt | string | Yes | N/A | N/A | The text prompt describing the image to generate |
style | string | No | landscape | landscape, portrait | Style of the generated image. Standard tier is limited to specific presets only. Custom style keywords are not supported in the standard tier. |
aspectRatio | string | No | 16:9 | 1:1, 16:9, 9:16 | Aspect ratio of the output image. |
Example Request Headers
{ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }
Example Request Body
{ "prompt": "A futuristic cityscape with neon lights and flying cars", "style": "landscape", "aspectRatio": "16:9" }
Example Response
{ "success": true, "message": "Standard image generated successfully", "data": { "imageUrl": "https://api.soreal.app/assets/users/1/generations/1749381948150.png", "creditBalance": 1000 } }
Error Codes
Status Code | Description |
---|---|
400 | Bad Request - Invalid parameters, Insufficient credits |
401 | Unauthorized - Invalid API key |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |