LLM endpoints
Create and manage a language model connection in LLM endpoints. The workspace shares its endpoints, usage and API keys across its team.
Status. Agent setup and automatic workspace endpoints are supported as of 2026-10-19; the waiting, retry and shared-capacity wording was corrected on 2026-11-16.
Quickstart for coding agents
Given “enroll to weights.fyi with model <MODEL_ID>”, connect your service using these settings and substitute that ID in the examples. Keep your key in the environment, outside source code and prompts.
| Setting | Value |
|---|---|
| Base URL | https://weights.fyi/run/v1 |
| Drop-in base URL | https://weights.fyi/run/v1/proxy: its first chat call creates and starts the endpoint, but does not wait for it |
| Authorization | Bearer $WEIGHTS_API_KEY, with read and submit scopes |
| Discovery | GET /run/v1/models, or GET /run/v1/proxy/models for OpenAI's list |
| Chat | POST /run/v1/chat/completions, or POST /run/v1/proxy/chat/completions |
| Agent guide | /run/llms.txt, plain text for coding agents |
| Token controls | IP allow-list, daily spend cap, and optional HMAC request signing in Endpoint & keys |
Point a coding agent at https://weights.fyi/run/llms.txt: it explains the key, model IDs and both base URLs.
The order is always the same: choose a model your catalog lists, make sure its endpoint exists, send a call, retry when the answer says not yet, and pay for the calls that finish. Send the exact id from the catalog, or a name its entry lists under aliases: the service does not guess, and a name it does not know answers 400 model_not_available with the IDs you can use. Check can_run, operations, input_modalities and streaming first. A person's shorthand, such as "gemma 12b", is resolved by the agent, by the rule in /llms.txt.
| Example model ID | Input modalities |
|---|---|
gemma3-12b | text + image |
gemma3-4b | text + image |
- Discover the model and check its capabilities:
curl -s https://weights.fyi/run/v1/models -H "Authorization: Bearer $WEIGHTS_API_KEY"- Ensure the workspace endpoint exists. This accepts
submitscope and answers409 endpoint_existswith its ID if present; continue to the smoke call in that case; publishing your own worker creates it automatically. With the drop-in base URL, skip this step.
curl -s https://weights.fyi/run/v1/endpoints -H "Authorization: Bearer $WEIGHTS_API_KEY" \
-H "Content-Type: application/json" -d '{"model": "gemma3-4b"}'- Run one live smoke call. On
503 model_not_readyor429 overloaded, wait theRetry-Afterseconds and send it again:
curl -s https://weights.fyi/run/v1/chat/completions -H "Authorization: Bearer $WEIGHTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemma3-4b", "messages": [{"role": "user", "content": "Reply with READY."}]}'With the Python openai package installed:
import os
from openai import OpenAI
# base_url="https://weights.fyi/run/v1/proxy" also creates and starts the endpoint.
client = OpenAI(base_url="https://weights.fyi/run/v1",
api_key=os.environ["WEIGHTS_API_KEY"])
answer = client.chat.completions.create(
model="gemma3-4b",
messages=[{"role": "user", "content": "Reply with READY."}],
)
print(answer.choices[0].message.content)JavaScript or TypeScript, in a server-side runtime with fetch:
const response = await fetch("https://weights.fyi/run/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WEIGHTS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gemma3-4b",
messages: [{ role: "user", content: "Reply with READY." }],
}),
});
if (!response.ok) throw new Error(`Chat failed: ${response.status}`);
console.log((await response.json()).choices[0].message.content);See Bring your own model to enroll a worker. The endpoint card also has a copyable Agent setup prompt.
No LLM chat model is available on this service yet.
Create and edit
Choose a configured model and select Create endpoint. This creates a record without starting inference. Each workspace has one endpoint per model. An endpoint is your workspace's connection and usage record, not hardware of its own: the model's capacity is shared by every workspace that calls it, and a readiness hold keeps the model ready without reserving any of it for you.
The endpoint card shows its state, readiness hold, today's cost and connection details. Owners and admins can edit its name and description, request readiness, or release a readiness hold. To use a different model, create that model's endpoint.
These actions are also available through the API: create, edit, read, request readiness and release readiness.
Connect another service
In the other service, choose its OpenAI-compatible connection option and configure:
| Setting | Value |
|---|---|
| Base URL | Copy it from the endpoint card; this service uses https://weights.fyi/run/v1, or https://weights.fyi/run/v1/proxy to start the endpoint on the first call. |
| Model | Copy the exact model ID, rather than the endpoint name or ID. |
| API key | Create a workspace key with read and submit under Endpoint & keys. |
| API operation | Chat completions, with streaming supported when the model is available. |
The other service must support a custom base URL and model ID. Enter the model manually, or use /v1/models?format=openai if it accepts a custom model-discovery URL. Responses, embeddings and arbitrary decision-question APIs are not available. The card includes a copyable Python client example; the chat reference documents request parameters and errors.
A new call is never held while a model starts. On the base URL a call to a stopped model answers 503 model_not_ready and starts it; on the drop-in base, and on either base while a model starts or moves, it answers 429 overloaded with reason: capacity_unavailable. Both carry Retry-After, so a client that retries gets through once the model is ready. For a latency-sensitive session, request readiness first and wait until the endpoint reads ready. Releasing readiness leaves the connection record available for later calls.
Usage and recovery
You pay for tokens in calls that finish with an answer. Existing credit or an active usage billing allowance is required. Starting a model and holding it ready have no separate charge; see prices and workspace billing.
A call already being answered when the service moves a model stays open and continues once the model is ready; a streamed one receives keepalive comments meanwhile. Some answers, including partially delivered tool calls and constrained output, cannot be continued. Request fields are checked rather than passed through: which options and tool fields a model takes, the recovery limits and every error are in the chat reference.
Endpoint usage reports requests, tokens and charges. The model catalog shows dated measured figures separately from current availability.
Scheduled work
Your scheduler can reserve a readiness hold, check it, then release it. A hold keeps the endpoint ready; it does not schedule calls or reserve chat concurrency.