API Documentation

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

NameTypeRequiredDescription
promptstringYesThe detailed text prompt describing the image to generate
stylestringYesStyle 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').
aspectRatiostringNoAspect 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
imagePromptUrlstringNoURL of an image to use as reference
imagePromptStrengthnumberNoControls how closely the generation follows the reference image. Valid values are between 0 and 1
fileFormatstringNoOutput 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 CodeDescription
400Bad Request - Invalid parameters, Insufficient credits
401Unauthorized - Invalid API key
429Too Many Requests - Rate limit exceeded
500Internal Server Error