Image Generation
Generate high-quality realistic or anime images.
Unified Generation Endpoint
This endpoint handles both standard generation and character-aware contextual generation.
- Endpoint:
POST https://api.luvr.ai/v1/images/generate
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
prompt | String | Yes | Text description of the image. |
character | String | No | Character username. If provided, applies character LoRAs and style. |
width | Int | No | Default: 640. |
height | Int | No | Default: 960. |
chat | Array | No | Conversation context. If provided (and character is set), returns a text reply too. |
negativePrompt | String | No | Elements to exclude. |
Response
{
"image": "base64_string...",
"text": "Here's my morning coffee!", // Only if chat/character provided
"prompt": "enhanced prompt used...",
"cost_usd": 0.075,
"timestamp": 1709823456
}Image Prompt Generator
Generate a highly detailed, cinematic prompt based on chat context. Useful if you want to generate the image elsewhere or show the user what would be generated.
- Endpoint:
POST https://api.luvr.ai/v1/images/prompts
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
chat | Array | Yes | Conversation history. |
character | String | No | Character context. |
Response
{
"prompt": "Cinematic shot of Ember at the beach...",
"cost_usd": 0.001,
"timestamp": 1709823456
}