lala Models API — Developer Documentation

One API key, access full suite of lala proprietary models. OpenAI-compatible interface, base URL:https://lala.buddylala.ai/v1

Authentication

All requests include headerx-lala-key: <your API key>(or standardAuthorization: Bearer <key>)。

Apply for key: Email[email protected]or contact us via WhatsApp.

Please keep your API key secure and do not hardcode it into frontend code or public repositories.

Model List

curl https://lala.buddylala.ai/v1/models -H "x-lala-key: $LALA_KEY"
ModelTypeEndpointDocumentation
lala-6chat/chat/completionsHigh-efficiency Multimodal Conversation (1M context)
lala-6-prochat/chat/completionsFlagship Multimodal Chat (1M context)
lala-ultrafastchat/chat/completionsUltra-fast inference chat (1M context)
lala-superchat/chat/completionsPremium Flagship Inference
lala-ragembedding/embeddingsText Vectorization (RAG Retrieval)
lala-imageimage/images/generationsImage Generation (Quality Priority)
lala-videovideo/responsesVideo Generation (Task-based, 4–30 seconds)
lala-video-getvideo/responsesQuery video task results
lala-speechtts/responsesHigh-quality Speech Synthesis
lala-musicmusic/responsesMusic Generation
lala-lyriclyric/responsesLyric Generation
lala-decisiondecision/typesafe/systemoneStructured Decision (No Text Generation)

Chat Completions

OpenAI-compatible. Supports stream: trueStreaming output.

curl

curl https://lala.buddylala.ai/v1/chat/completions \
  -H "x-lala-key: $LALA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lala-6",
    "messages": [{"role": "user", "content": "Hello, introduce yourself"}],
    "max_tokens": 500
  }'

Python(openai SDK)

from openai import OpenAI

client = OpenAI(
    base_url="https://lala.buddylala.ai/v1",
    api_key="***",   # your lala key
)

resp = client.chat.completions.create(
    model="lala-super",
    messages=[{"role": "user", "content": "Write a poem about autumn"}],
)
print(resp.choices[0].message.content)

Node.js

const res = await fetch("https://lala.buddylala.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "x-lala-key": process.env.LALA_KEY,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    model: "lala-ultrafast",
    messages: [{ role: "user", content: "1+1=?" }],
    stream: false,
  }),
});
const data = await res.json();
console.log(data.choices[0].message.content);

Vector Embeddings

curl https://lala.buddylala.ai/v1/embeddings \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{"model": "lala-rag", "input": "Pet food retail automation"}'

Return standard OpenAI embeddings format (data[].embeddingVector array), can be directly fed into vector database for RAG.

Image Generation

curl https://lala.buddylala.ai/v1/images/generations \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{"model": "lala-image", "prompt": "a cute corgi puppy, studio photo", "n": 1}'

Returndata[].url(Image CDN link). Billing: fixed price per image, seePricing page。

Video Generation (Task-based)

Video GenerationTwo-stage: Submit task first to obtain task id, then poll for results.

Step 1: Submit Task

curl https://lala.buddylala.ai/v1/responses \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{
    "model": "lala-video",
    "input": [{"type": "text", "text": "a cat yawning in sunlight"}],
    "duration": 5,
    "resolution": "720p",
    "ratio": "16:9",
    "generate_audio": true
  }'
# → {"id": "cgt-xxxx", ...}   ← Save this task ID!

Parameters:duration4–30 seconds (or -1 for smart selection)、resolution 480p/720p/1080p、ratio 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / 21:9 / adaptive、generate_audioDefault true (auto-configure voice/sound effects/background music).

Step 2: Poll Results

curl https://lala.buddylala.ai/v1/responses \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{"model": "lala-video-get", "input": "cgt-xxxx"}'
# status: succeeded when output[].content[].text = video download URL
Task ID lost means results cannot be retrieved (charges already incurred). Rendering takes approximately 1–5 minutes, recommend polling every 15–30 seconds.

Speech Synthesis (TTS)

curl https://lala.buddylala.ai/v1/responses \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{
    "model": "lala-speech",
    "input": "Hello, welcome to Buddylala",
    "output_format": "hex",
    "voice_setting": {"voice_id": "male-qn-qingse", "speed": 1, "vol": 1, "pitch": 0}
  }'
# → {"data": {"audio": "<hex encoded audio>"}}

Convert hex to mp3:python3 -c "import binascii,sys; open('out.mp3','wb').write(binascii.unhexlify(sys.argv[1]))" "<hex>"80+ preset voice options, 9 emotion types.

Music Generation

curl https://lala.buddylala.ai/v1/responses \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{
    "model": "lala-music",
    "input": "upbeat jingle for a pet shop",
    "lyrics": "la la la happy day with you"
  }'
# → {"data": {"audio": "<hex>"}}

lyricsRequired (can use existing content first).lala-lyricGenerated).

Lyric Generation

curl https://lala.buddylala.ai/v1/responses \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{
    "model": "lala-lyric",
    "mode": "write_full_song",
    "input": "An upbeat Cantonese song about cats"
  }'
# → {"song_title": "...", "style_tags": "...", "lyrics": "[Verse]..."}

mode:write_full_song(complete song) oredit(Continue/modify, must include lyricsExisting content).

Structured Decision (Non-text Generation)

lala-decisionNo text generation, onlyStructured Decision: Provide a status segment (ticket/conversation/log) + a set of questions, return Choice / Score / Noul answers in parallel with calibrated probabilities.Support image recognition: Can attach up to 4 images (PNG/JPEG/WebP, each ≤4MiB, base64 embedded, no remote URLs) for joint analysis. Typical response 1–5 seconds, suitable for ticket routing, intent recognition, content moderation.

curl https://lala.buddylala.ai/typesafe/systemone \
  -H "x-lala-key: $LALA_KEY" -H "Content-Type: application/json" \
  -d '{
    "model": "lala-decision",
    "state": "Customer: my order is 5 days late and I want a refund!",
    "questions": {
      "urgency": {
        "type": "choice",
        "instructions": "Assess ticket urgency level",
        "criteria": {"Low": "Calm tone", "Medium": "Dissatisfied but no deadline", "High": "Emotional or requesting refund"}
      },
      "refund_requested": {
        "type": "noul",
        "instructions": "Did customer explicitly request a refund?"
      }
    }
  }'
# → {"answers": {"refund_requested": {"noul": 0.99, "type": "noul"}}, "model": "lala-decision", ...}

Question Type:choice(criteria is object: option name → judgment standard)、score(criteria is array: from low to high tier)、noul(true/false judgment, criteria not required)。

Image Recognition (Optional): Add to body"images": ["<base64 image>"](Maximum 4 images; each ≤4MiB, 16 megapixels; entire request body ≤13MiB; base64 embedded only, no URLs). Example:

{
  "model": "lala-decision",
  "images": ["iVBORw0KGgo...(base64 PNG)"],
  "state": "Customer sent a receipt photo, requesting we review it",
  "questions": {
    "is_valid_receipt": {"type": "noul", "instructions": "Is the image a valid receipt?"}
  }
}

Error Handling

HTTPMeaningProcessing
401API key invalid or missingCheckx-lala-key header
400Model name does not exist / body format errorRefer to model list and respective endpoint examples
5xxUpstream occasional errorExponential backoff retry (recommended maximum 3 attempts)

Response text undergoes brand normalization (vendor-related terms unified to lala/buddylala brand naming), JSON structure and fields fully standardized, no impact on parsing.