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 | Description |
---|---|---|---|
prompt | string | Yes | The text prompt describing the image to generate |
style | string | Yes | Style of the generated image. Standard tier is limited to specific presets only. Defaults to 'landscape' if not provided. Available presets: default, landscape, portrait. Custom style keywords are not supported in the standard tier. |
aspectRatio | string | No | Aspect ratio of the output image. Valid values: 1:1, 16:9, 9:16 |
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": "photorealistic", "aspectRatio": "16:9" }
Example Response
{ "success": true, "message": "Image generated successfully", "data": "https://api.soreal.app/assets/users/1/generations/1749381948150.png" }
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 |