API Reference
Premium Image Generation
POST
https://api.soreal.app/create-image/premium
Description
Generate a high-quality image with advanced controls and parameters for detailed customization.
This endpoint requires 60 credits per image generated.
Parameters
Name | Type | Required | Description |
---|---|---|---|
prompt | string | Yes | The detailed text prompt describing the image to generate |
style | string | Yes | Style of the generated image. Can be a preset name or custom style keywords. Defaults to 'default' if not provided. Available presets: default, portrait, landscape, hardlight, neonlit, faded, staged, sunlit, shadowed, washed, backglow, overcast, closeup, lowangle, topdown, groundview, overshoulder. Premium tier supports custom style keywords (e.g., 'anime', 'sketch', 'oil painting', 'watercolor'). |
aspectRatio | string | No | Aspect ratio of the output image. Valid values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 9:21 |
imagePromptUrl | string | No | URL of an image to use as reference |
imagePromptStrength | number | No | Controls how closely the generation follows the reference image. Valid values are between 0 and 1 |
fileFormat | string | No | Output file format for the generated image. Valid values: png, jpg |
Example Request Headers
{ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }
Example Request Body
{ "prompt": "A happy golden labrador retriever running in a sunny meadow with flowers", "style": "photorealistic", "aspectRatio": "3:4", "imagePromptUrl": "https://example.com/reference-image.jpg", "imagePromptStrength": 0.3, "fileFormat": "png" }
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 |