NEWGPU owners: host free demos on your card and earn a bigger share of every paid job. See how →

For developers

An OpenAI-compatible API for open-weight models

Keep the OpenAI SDK you already use, change the base URL, and call open chat and vision models that run on a community GPU network. Pay per token in credits, with no subscription.

Get an API keyPaste this into Claude Code, Cursor or any coding agentIt reads the agent quickstart, asks you for your key, and makes one test call.All models and pricesTry it in chat
The short answer. Base URL https://api.legit2compute.com/nodes/llm/v1, your legit2compute key, and any model ID from the table below or l2c/auto. Prices start at $0.030 per million input tokens. Signing up with Discord, Google, GitHub or Twitch includes $1 of trial credit.

Two lines change

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.legit2compute.com/nodes/llm/v1", api_key="YOUR_L2C_KEY")
r = client.chat.completions.create(
    model="l2c/auto",
    messages=[{"role": "user", "content": "Write a haiku about idle GPUs."}],
)
print(r.choices[0].message.content)

curl

curl https://api.legit2compute.com/nodes/llm/v1/chat/completions \
  -H "Authorization: Bearer $L2C_KEY" -H "content-type: application/json" \
  -d '{"model":"l2c/auto","messages":[{"role":"user","content":"Hello"}]}'

Agent tools work the same way: step-by-step setups for Hermes Agent, OpenClaw and Odysseus.

Models and prices

Dollars per million tokens, input / output, read from the live catalog.

ModelInput / outputContextLoaded
Llama 3.1 8B
llama3.1
$0.030 / $0.050128K● now
MiniCPM-V 2.6 8B (vision)
minicpm-v:latest · image in
$0.040 / $0.06032K● now
Ornith 1.5 9B (vision, 256K)
ornith-1.5:9b · image in
$0.080 / $0.14256K● now
Ornith 1.5 35B (vision, 256K)
ornith-1.5:35b · image in
$0.12 / $0.80256K● now
Granite 3.2 Vision 2B
granite3.2-vision:2b · image in
$0.040 / $0.06016K○ on demand
MiniCPM-V 4.6 (vision)
minicpm-v4.6:latest · image in
$0.040 / $0.06032K○ on demand
DeepSeek-OCR 3B
deepseek-ocr:3b · image in
$0.040 / $0.060128K○ on demand
GLM-OCR
glm-ocr:latest · image in
$0.040 / $0.06016K○ on demand
Granite 4.2 3B (text)
granite4.2:3b
$0.040 / $0.060128K○ on demand
LFM3 1.7B (text)
lfm3:1.7b
$0.040 / $0.060256K○ on demand

Every model, with embeddings, rerank and speech to text →

What else comes with the key

Auto routing

l2c/auto picks the cheapest loaded model in the tier your request needs. Cap or floor the tier per request.

Private by default

Prompts and outputs are not stored. A private tier keeps traffic on our own machines.

Images, video, music, voice

The same key and credits run media jobs. See images and video.

Questions

Does it work with the OpenAI SDK?

Yes. Keep the SDK you use and set the base URL to https://api.legit2compute.com/nodes/llm/v1 with your legit2compute key. The key is accepted as Authorization: Bearer or x-api-key.

Which endpoints are there?

Chat completions with streaming, tool calling, JSON mode and image input on the models marked for it, plus /v1/models, embeddings, rerank and speech to text. The docs list each one.

How is it billed?

Per token, in credits (1 credit = $0.01), with no subscription. Each model's input and output price per million tokens is on the models page, and your Activity page shows the tokens and cost of every request. Signing up with Discord, Google, GitHub or Twitch includes $1 of trial credit.

What does l2c/auto do?

Send l2c/auto as the model and the gateway picks the cheapest model that is loaded right now in the tier your request calls for, and bills at that model's price.

Do you store prompts or outputs?

No. Prompts and outputs are not stored. A private tier keeps your traffic on our own machines.

What if a model isn't loaded?

A model that isn't loaded answers 503 with "warming": true while it starts; retry in a minute or two, or use a model marked available now.

Point your client at it and go.

Sign up with Discord, Google, GitHub or Twitch, copy your key, change the base URL.