Quickstart

Docs · Getting started

Quickstart

Send a first request to the live LFM3-1.7B model through the OpenAI-compatible gateway.

On this page

The gateway exposes an OpenAI-compatible chat completions endpoint. This guide sends one request and reads the reply. The only live model is LFM3-1.7B, with the model key lfm3.

Before you start

You need an API key issued through the invite process. There is no public signup and no key-creation page.

export EASYAI_API_KEY="<key from your invite>"

Use the gateway origin shown in your invite. This documentation uses https://<your-domain> as the placeholder.

Send a request

curl https://<your-domain>/v1/chat/completions \
  -H "Authorization: Bearer $EASYAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lfm3",
    "messages": [
      { "role": "user", "content": "Explain what a lease is in one paragraph." }
    ]
  }'

A successful response is a chat.completion object. Read the answer from choices[0].message.content. The gateway also adds jobId, status, and output fields for clients that need the control-plane job identity.

Stream the reply

Set "stream": true to receive server-sent events instead of one JSON body. Each event carries a chat.completion.chunk with one delta.content value, and the stream ends with data: [DONE].

curl -N https://<your-domain>/v1/chat/completions \
  -H "Authorization: Bearer $EASYAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lfm3",
    "messages": [
      { "role": "user", "content": "Count from one to five." }
    ],
    "stream": true
  }'

See Streaming for the event format and failure behavior.

Current limits

  • Model: lfm3 (LFM3-1.7B). Qwen3 models are planned, not live.
  • Context: the gateway estimates input at ceil(characters / 4) per message. A request estimated above 2,048 input tokens is rejected with 413 CONTEXT_LIMIT before a job is created.
  • Output: 512 tokens by default; maxTokens or max_tokens can request up to 4,096.
  • Rate: 60 requests per minute per API key in the current gateway.
  • Messages: 1 to 64 messages per request, with roles system, user, or assistant.

When no eligible worker is online, the request fails with 503 NO_CAPACITY. An idle network is degraded, not a successful request.

Next steps

Docs menu