API Reference
Examples

API Examples

Ready to build? Here are some common examples to help you get started quickly.

You'll need your API key for these examples. Get it from the API Keys dashboard.

Interactive Chat

Create a simple chat interface with a character.

curl -X POST https://api.luvr.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "character": "ember",
    "chat": [
      {"role": "user", "content": "Hi there!"}
    ]
  }'

Generate Character Image

Generate a contextual image of a character.

curl -X POST https://api.luvr.ai/v1/images/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "wearing a red dress at a cafe",
    "character": "ember",
    "width": 640,
    "height": 960
  }'

Text to Speech

Convert text into character speech.

curl -X POST https://api.luvr.ai/v1/audio/speech \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, it is nice to meet you.",
    "voice_id": "DEFAULT_VOICE_ID"
  }'