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." }
]
}' import os
from openai import OpenAI
client = OpenAI(
base_url="https://<your-domain>/v1",
api_key=os.environ["EASYAI_API_KEY"],
)
completion = client.chat.completions.create(
model="lfm3",
messages=[
{"role": "user", "content": "Explain what a lease is in one paragraph."}
],
)
print(completion.choices[0].message.content) const response = await fetch("https://<your-domain>/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EASYAI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "lfm3",
messages: [
{ role: "user", content: "Explain what a lease is in one paragraph." },
],
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data.choices[0].message.content); 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
}' import os
from openai import OpenAI
client = OpenAI(
base_url="https://<your-domain>/v1",
api_key=os.environ["EASYAI_API_KEY"],
)
stream = client.chat.completions.create(
model="lfm3",
messages=[{"role": "user", "content": "Count from one to five."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="") const response = await fetch("https://<your-domain>/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EASYAI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "lfm3",
messages: [{ role: "user", content: "Count from one to five." }],
stream: true,
}),
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
process.stdout.write(decoder.decode(value, { 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 with413 CONTEXT_LIMITbefore a job is created. - Output: 512 tokens by default;
maxTokensormax_tokenscan 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, orassistant.
When no eligible worker is online, the request fails with
503 NO_CAPACITY. An idle network is degraded, not a successful request.