API Documentation

API Reference

Premium Image Generation

POST

https://api.soreal.app/create-image/premium

Description

Generate ultra-high-quality images using advanced AI models for both text prompts and image references. Includes automatic quality enhancement.

This endpoint requires 60 credits per image generated.

Parameters

NameTypeRequiredDefaultOptionsDescription
promptstringNoN/AN/AThe detailed text prompt describing the image to generate. Either prompt or imagePromptUrl is required. Universal quality enhancement is automatically applied.
aspectRatiostringNo16:921:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 9:21Aspect ratio of the output image. When using text-only generation: 1:1, 9:16, 16:9, 3:4, 4:3. When using a reference image: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 9:21.
imagePromptUrlstringNoN/AN/AURL of an image to use as reference. When provided, the system will use the image as a reference for generation. Either prompt or imagePromptUrl is required.
fileFormatstringNopngpng, jpgOutput file format for the generated 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",
  "aspectRatio": "16:9",
  "imagePromptUrl": "https://example.com/reference-image.jpg",
  "fileFormat": "png"
}

Example Response

{
  "success": true,
  "message": "Premium image generated successfully",
  "data": {
    "imageUrl": "https://api.soreal.app/assets/users/1/generations/1749381948150.png",
    "creditBalance": 940
  }
}

Error Codes

Status CodeDescription
400Bad Request - Invalid parameters, Insufficient credits
401Unauthorized - Invalid API key
429Too Many Requests - Rate limit exceeded
500Internal Server Error