Developer docs
Build on legit2compute
One API key for open language and vision models, and for rendering images, video, music, voice and sound effects on the network. Point any OpenAI client at us, or plug us into the agent you already run.
Quickstart
- Get a key. Sign in at legit2compute.com/developers. Signing in with Discord includes trial credit; an email sign-up starts at zero and tops up from the same page. Your key starts with
l2ck_. - Call a model. The gateway speaks the OpenAI chat API, so this is the whole integration:
export L2C_API_KEY=l2ck_...
curl https://api.legit2compute.com/nodes/llm/v1/chat/completions \
-H "Authorization: Bearer $L2C_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "qwen3.8:27b", "messages": [{"role": "user", "content": "Say hello in five words."}]}'from openai import OpenAI
client = OpenAI(base_url="https://api.legit2compute.com/nodes/llm/v1", api_key="l2ck_...")
reply = client.chat.completions.create(
model="qwen3.8:27b",
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(reply.choices[0].message.content)Language models
- Models.
GET https://api.legit2compute.com/nodes/llm/v1/modelslists every model your key can call, with its context window, tool support and price. The same list with live availability is on /models. - Auto. Send
"model": "l2c/auto"and each request is served by the cheapest loaded model that fits it. For agents, name a model instead: an agent loop wants the same model on every turn. - Tools, vision, streaming, JSON mode work the OpenAI way. Reasoning is off unless you ask for it with
"reasoning_effort". - Billing. Per token, from your credit (1 credit = $0.01). Repeated prompt prefixes (an agent's system prompt and tool list) bill at the cached rate, which is what keeps agent loops cheap.
- Privacy. We record metadata only (model, token counts, latency, status). Prompts and outputs are not stored.
- Hostname. Older guides and configs use
wni.legit2compute.com. It is the same API and keeps working; there is nothing to change.
Models that suit agents
| Model ID | Context | Takes images | $ / 1M in · out · cached | Now |
|---|---|---|---|---|
llama3.1Llama 3.1 8B |
128K | — | $0.016 · $0.032 · $0.008 | resident |
ornith-1.5:9bOrnith 1.5 9B (vision, 256K) |
256K | yes | $0.050 · $0.080 · $0.020 | resident |
ornith-1.5:35bOrnith 1.5 35B (vision, 256K) |
256K | yes | $0.18 · $0.30 · $0.050 | on demand |
qwen3.8:27bQwen3.8 27B (vision + text) |
128K | yes | $0.12 · $1.50 · $0.030 | resident |
llama3.1:70bLlama 3.1 70B |
128K | — | $0.32 · $0.32 · $0.10 | on demand |
deepseek-ocr:3bDeepSeek-OCR 3B |
128K | yes | $0.040 · $0.060 · $0.020 | on demand |
granite4.1:3bGranite 4.1 3B (text) |
128K | — | $0.040 · $0.060 · $0.020 | on demand |
Tool calling and at least 64K context, from the live catalog. A model that is not resident answers 503 with "warming": true for a minute or two while it starts; the resident ones answer straight away.
Media generation
Images, image edits, image-to-video, text-to-video, music, voiceovers and sound effects are jobs: submit, poll, download, with the same key. Every endpoint is in the API reference.
curl https://api.legit2compute.com/jobs -H "x-api-key: $L2C_API_KEY" -H "Content-Type: application/json" \
-d '{"pipeline": "image_generate", "inputData": {"prompt": "a lighthouse at dawn, watercolor"}}'
# then GET https://api.legit2compute.com/jobs/<job_id> until "completed", and download (it redirects to the file, hence -L):
curl -L -o out.png https://api.legit2compute.com/jobs/<job_id>/download -H "x-api-key: $L2C_API_KEY"The agent skill
The legit2cloud skill teaches an agent the whole platform: which pipeline makes what, how to submit, wait and download, and how to call the models. It is a standard SKILL.md folder with a dependency-free Python CLI, so it works in Claude Code, Hermes Agent, OpenClaw and anything else that reads Agent Skills. It needs Python 3.8+ and L2C_API_KEY in the environment.
Integration guides
Hermes Agent
by Nous ResearchThe self-improving terminal and messaging agent. Use our models as its custom provider and give it the media skill.
OpenClaw
by OpenClawThe personal assistant that lives in your chat apps. Add us as a provider in openclaw.json and install the media skill.
Odysseus
by odysseus-devThe self-hosted AI workspace. Add one model endpoint in Settings and every chat, agent and research run can use it.
Anything else that takes an OpenAI-compatible base URL works the same way: base URL https://api.legit2compute.com/nodes/llm/v1, your l2ck_ key, a model ID from the table above.