API Reference
Image Generation

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

FieldTypeRequiredDescription
promptStringYesText description of the image.
characterStringNoCharacter username. If provided, applies character LoRAs and style.
widthIntNoDefault: 640.
heightIntNoDefault: 960.
chatArrayNoConversation context. If provided (and character is set), returns a text reply too.
negativePromptStringNoElements 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

FieldTypeRequiredDescription
chatArrayYesConversation history.
characterStringNoCharacter context.

Response

{
  "prompt": "Cinematic shot of Ember at the beach...",
  "cost_usd": 0.001,
  "timestamp": 1709823456
}