# weights.fyi > OpenAI-compatible chat with the language models of your weights.fyi workspace: one API key, one base URL. This guide is for coding agents (Claude Code, Codex, Antigravity, OpenCode) asked to wire an app to a model such as "gemma 12b". ## 1. The API key Read the key at run time; never write it into source code, prompts, commits or logs. Verify the target base URL is under `https://weights.fyi/run/` before reading from Keychain, and scope Keychain lookups to an explicit account (`-a`) so multiple workspaces never collide: - the environment or the project's `.env`: `WEIGHTS_API_KEY` - the macOS Keychain (scoped by account): `security find-generic-password -s "weights-fyi-token" -a "${WEIGHTS_ACCOUNT:-default}" -w` - the macOS Keychain, Almanakje workspace: `security find-generic-password -s "weights-fyi-almanakje-token" -a "almanakje" -w` ```sh export WEIGHTS_API_KEY="${WEIGHTS_API_KEY:-$(security find-generic-password -s "weights-fyi-token" -a "${WEIGHTS_ACCOUNT:-default}" -w)}" ``` Send it as `Authorization: Bearer $WEIGHTS_API_KEY`. The key needs the `read` and `submit` scopes; never forward it across HTTP redirects. ## 2. The base URL | Use | Base URL | Calls | |---|---|---| | Drop-in OpenAI client (start here) | `https://weights.fyi/run/v1/proxy` | `GET /models`, `POST /chat/completions` | | Endpoint-managed | `https://weights.fyi/run/v1` | `GET /models`, `POST /endpoints`, `POST /chat/completions` | - `https://weights.fyi/run/v1/proxy`: the first chat call creates and starts your workspace endpoint. No `POST /v1/endpoints` call is needed. A call is not held open while the model starts or moves: it answers `429 overloaded` with `Retry-After` at once; wait that many seconds and send the same call again. - `https://weights.fyi/run/v1`: create the endpoint once with `POST https://weights.fyi/run/v1/endpoints` and `{"model": ""}` (`409 endpoint_exists` means it already exists). A call to a stopped model answers `503 model_not_ready` with `Retry-After`. ## 3. The model ID Model IDs differ per workspace. Never guess one: list them with the key, then match the user's words against `data[].id`. ```sh curl -s https://weights.fyi/run/v1/proxy/models -H "Authorization: Bearer $WEIGHTS_API_KEY" ``` The answer is OpenAI's list, `{"object": "list", "data": [{"id": "...", ...}]}`: every model the key's workspace can call, models served for that workspace (such as `almanakje-gemma3-12b`, `almanakje-gemma3-4b`) and platform models (such as `qwen3.5-4b`, `qwen3.8-27b`). | The user says | Look for an `id` like | |---|---| | gemma 12b | `almanakje-gemma3-12b` or `gemma3-12b` | | gemma 4b | `almanakje-gemma3-4b` or `gemma3-4b` | | qwen 4b | `qwen3.5-4b` | | qwen 27b | `qwen3.8-27b` | Use the exact `id` from the list. Resolve a non-empty printable-ASCII shorthand deterministically against `data[].id` (bounding query length to 128 characters, 16 tokens and 256 catalog entries): exact match first; then lowercase alphanumeric match (letters and digits only, collapsing hyphens and punctuation, refusing collisions); then polynomial ordered whole-token coverage where each query token equals a distinct candidate token in order, ranked by fewest extra candidate tokens and then shortest id, refusing ties. When none matches or a tie remains, show the user the list; never substitute another model silently. A chat call naming a model the workspace lacks answers `400 model_not_available`, and its message lists the IDs that are available. ## 4. A first call ```sh curl -s https://weights.fyi/run/v1/proxy/chat/completions -H "Authorization: Bearer $WEIGHTS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "almanakje-gemma3-12b", "messages": [{"role": "user", "content": "Reply with READY."}]}' ``` Python, with the `openai` package: ```python import os from openai import OpenAI client = OpenAI(base_url="https://weights.fyi/run/v1/proxy", api_key=os.environ["WEIGHTS_API_KEY"]) answer = client.chat.completions.create( model="almanakje-gemma3-12b", messages=[{"role": "user", "content": "Reply with READY."}], ) print(answer.choices[0].message.content) ``` A model that is asleep takes time to start: until it is ready a call answers `429` with `Retry-After`, so retry in a loop that waits `Retry-After` seconds each time and gives up at your own deadline. `typical_ready_seconds` from `GET https://weights.fyi/run/v1/models` says how long a start usually takes. Stream (`"stream": true`) for long answers. ## 5. Errors Chat errors are OpenAI-shaped: `{"error": {"message", "type", "code", ...}}`. | Status and code | Meaning | What to do | |---|---|---| | `401 unauthorized`, `invalid_token`, `token_revoked`, `token_expired` | The key is missing, wrong or no longer valid | Read the key again; ask the user for a new one | | `403 scope_required` | The key lacks `read` or `submit` | Ask for a key with both scopes | | `400 model_not_available` | The workspace has no such model | Pick an `id` from `error.available` | | `402 no_credit` | The workspace is out of credit | Tell the user; do not retry | | `429 overloaded` with `Retry-After` | Busy, or the model is starting or moving; nothing was accepted | Wait `Retry-After` seconds, then resend | | `429 campaign_concurrency_limited` | One turn of a compute plan's session arrived while the model was full; the plan has not failed | Wait `Retry-After` seconds and resend that turn; do not resubmit the plan | | `503 model_not_ready` | The model is starting (endpoint-managed base URL) | Wait `Retry-After` seconds, or use the drop-in base URL | ## 6. A workspace from code A program holding a key with the `manage` scope sets up the workspace it should work in, with its tracing switched off, in one call. No app, no clicks. - `GET https://weights.fyi/run/v1/workspaces`: the key's workspace with its trace switches, how many trace destinations it has, and `governed_tracing` (`true` when both switches are off and there is no destination). - `POST https://weights.fyi/run/v1/workspaces`: finds the workspace named `name` among the key's person's workspaces (case does not matter) or creates it, writes `trace_preferences` (both `false` unless asked), removes trace content already kept (`purge_trace_content`, `true` by default when both switches end off), makes an endpoint for each id in `models`, and returns a key of that workspace once when `issue_token` names one. The same body sent again finds the same workspace: `201` the first time, `200` after. ```sh curl -s -X POST https://weights.fyi/run/v1/workspaces -H "Authorization: Bearer $WEIGHTS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "awow-io", "trace_preferences": {"log_inputs": false, "log_outputs": false}, "purge_trace_content": true, "models": ["almanakje-gemma3-12b"]}' ``` A governed platform (awow.io is one) keeps `log_inputs` and `log_outputs` at `false` and registers no trace destination, so no copy of the inputs or outputs of its calls is kept here and no trace is exported from here; it reads `governed_tracing` back before its first job and does not run one while that reads `false`. The switches govern content only. Records without content still stay: each job's and call's identifiers, times, model, counts and outcome, the spans of the job log, and the usage, charges and receipts it was billed by (`GET https://weights.fyi/run/v1/usage`). A model in `models` that the workspace cannot run answers `400 model_not_available` after the workspace and its switches are in place; the same call with a corrected list completes it. ## 7. Data in place ComputePlans name existing data by URI. Use the format's native reader where the workload supports it. JIT hydration fetches and caches verified bytes when needed; `prestage` requires prior preparation. `GET https://weights.fyi/run/v1/compute/capabilities` (`read` scope) lists `dataset_protocols`, `data_formats`, `runtime_support` and source verification checks. `native_readers`/`reader_examples` name ecosystem tools, not installed decoders. Consult `runtime_support.workloads` before choosing a worker. Bundled classifier, embedding and agent-seat workers accept JSONL (optionally Zstandard) from `source_uri` or `r2_input_uri`, including a pinned `[start, end)` byte range. Record inputs are limited to 512 MiB (up to 4 GiB streamed decoded for Zstandard classifier packs, which also decode raw crawl `bodyB64` fields and skip bodiless crawl rows). Parquet, Arrow IPC, Lance and Safetensors require custom decoding or conversion to record packs. Product workers exclude the research-only `llm_batch_drain` and `cpu_scavenger` commands unless an operator installs a custom runtime. OCI requires prestaging; non-custody sources currently use public HTTPS. | Scheme | Form | Pin it with | |---|---|---| | `s3` | `s3:///` | `sha256` | | `r2` | `r2://tenants//` | `sha256`; your own tenant only | | `gs` | `gs:///` | `sha256` | | `az` | `az:///` or `abfss://@.dfs.core.windows.net/` | `sha256` | | `https` | an HTTPS URL | `sha256`, always | | `hf` | `hf:///@/`; optional `datasets/` after the scheme | `@` and a byte digest for JIT hydration | | `oci` | `oci:///@sha256:<64-hex>` | the `@sha256:` digest; prestage before execution | | Format | Extensions | Read it with | |---|---|---| | Apache Parquet | `.parquet` | `pyarrow.dataset`, `polars.scan_parquet`, `duckdb` | | Apache Arrow IPC (Feather) | `.arrow`, `.ipc`, `.feather` | `pyarrow.ipc`, `polars.scan_ipc` | | Lance | `.lance` | `lance`, `pyarrow.dataset` | | Seekable Zstandard record packs | `.jsonl.zst`, `.ndjson.zst`, `.zst` | `zstandard`, one pack per `byte_range: [start, end]` | | NDJSON | `.jsonl`, `.ndjson` | `pyarrow.json`, `polars.scan_ndjson` | | safetensors | `.safetensors` | `safetensors` | Check a plan before you submit it. `POST https://weights.fyi/run/v1/compute/plans/dry-run` takes the same JSON body as submission (`submit` scope) and admits, queues and charges nothing. It answers `200` with a verdict even for a plan the rules refuse: `plan_valid` (the plan rules accept it), `tenancy_authorized` (your account holds the grant on the plan's tenant), `ok` (no finding is an error), `verified` (every check actually ran) and `findings` (each error or warning with a `code` and a `message`); `models` says for each model whether its release is pinned and which context window a request is checked against. Add `?verify_source=true` to read every source by a short range, as submission with `verify_source` would. Submit only when `ok` is `true`. Treat `verified: false` as not proven and read `unverified` for the checks that did not run. A dry run reserves no capacity, holds no price and does not prove that execution will succeed; `429 dry_run_busy` means send it again after `Retry-After`. Follow this flow with `submit` for writes and `read` for progress: 1. `POST https://weights.fyi/run/v1/compute/plans` declares stages and dependencies. Put JIT mounts in the stage's `workload.mounts`; each names `source_uri`, `sha256`, optional `byte_range` and `format`, and `hydration`: `jit` or `prestage`. Set `verify_source: true` on the plan to check all mounts, or on a stage's `workload` to check that stage. Save the returned `plan_id` and stage `stream_id`. Omit plan-level `lazy` for ordinary submission: it holds the plan until service dispatch, independently of lazy packs. 2. `POST https://weights.fyi/run/v1/streams/{stage_id}/packs` registers runnable input with `pack_id`, `item_count`, `source_uri`, `sha256` and `compressed_bytes`. Use `stream_id` for `{stage_id}`, or an authored identifier with `?plan_id=...`. Omitting `ordinal` assigns the next value and reuses it on replay. An already prepared `r2_input_uri` takes precedence over `source_uri`; supply token estimates with that form. 3. For deferred preparation, register `state: "lazy"` pointers with identifiers and item counts. `GET https://weights.fyi/run/v1/streams/{stage_id}/packs?lookahead_window=32` returns `counts`, `deficit` and `next_lazy_packs` in ordinal order. Repost candidates as `state: "pending"` with runnable fields, retaining identity, item count and provenance. `429 stream_backpressure` means wait for active work to drain. 4. Set `verify_source: true` on pack registration, or `?verify_source=1` on either submission call. Inspect `source_probe.verified`, `mode` and `probes`; a success can remain `syntax_and_custody_only` when nothing was read, including a lazy prefix. Individual probes contain `uri`, HTTP `status`, `supports_range`, `remote_bytes`, `magic_ok` and the relevant pack or mount identifier. `live_range_probe` checks reachability, range behavior, bounds and recognized headers; OCI gets a reachability HEAD only. It does not verify the full digest. `400 source_unreachable`, `source_range_unsupported`, `source_range_out_of_bounds`, `source_size_mismatch` and `source_format_mismatch` mean fix the source. `503 source_probe_unavailable` means required service configuration is missing. Failed checks prevent new registration and leave earlier accepted work intact. 5. For prepared tenant-stored input, `POST https://weights.fyi/run/v1/compute/plans/{plan_id}/stages/{stage_id}/materialize` with `{}` fills the stage's configured `lazy_materializer` lookahead. An eligible plan can register its first batch during admission; read the backlog first. Supply actual input paths, byte counts and digests in its manifest or lazy registrations; missing source digests, byte counts or row counts are rejected; templates do not prepare or verify input. `{"force_fill":true}` removes the batch-size cap, preserving all other limits and eligibility. An ineligible stage returns zero work. This call does not accept `verify_source`. 6. `POST https://weights.fyi/run/v1/streams/{stage_id}/seal` prevents new pack identifiers while registered work drains. Existing lazy packs can still become runnable. Read `stream_sealed` and completion counts from backlog. Managed execution reports completion itself. `POST https://weights.fyi/run/v1/streams/{stage_id}/packs/{pack_id}/complete` requires an already leased harness-owned pack; current plan admission creates no such stream. A customer token cannot complete managed packs here. 7. `POST https://weights.fyi/run/v1/compute/plans/{plan_id}/promote` with `{}` changes a standing plan to standard scheduling while preserving progress; optional `max_hourly_usd_micros` replaces its ceiling. It does not release a plan's initial lazy queue. Promotion is not repeat-safe: inspect the plan after a lost response because a second promotion conflicts. 8. For an open-ended workload, declare `continuous: true` beside `open_stream: true` on the stage workload: the stream is never sealed on a pack count, and a pack registered after it was sealed or completed reopens the stage inside the plan's window (`stream_reopened`). To fold dated plans of one workload into one continuous plan, `POST https://weights.fyi/run/v1/compute/plans/{plan_id}/consolidate` with `superseded_plan_ids` and optional `stage_map`, `retry_dead_lettered` and `reason`: their pending, lazy and dead-lettered packs move here as `.`, live superseded plans are cancelled, and a repeat replays. A superseded plan holding a live lease refuses the call. 9. `GET https://weights.fyi/run/v1/compute/plans/{plan_id}` reads state, progress and cost: `state` is the lifecycle, `outcome` and `coverage` say what the packs delivered, `accounting` holds budget, spend and reservations, and a failed or cancelled stage carries its `failure`. `GET https://weights.fyi/run/v1/compute/events?after_seq=0&limit=500` returns a JSON array in increasing `seq` order. Save the last processed sequence and retain it on empty pages; gaps are normal. Optional `tenant_id` narrows the account's results; filter `plan_id` locally. Use zero for history or the plan receipt's `last_event_seq` for subsequent events. Lease-readiness events can contain scoped bearer tokens; keep responses private. 10. To be told instead of polling, `POST https://weights.fyi/run/v1/trace-sinks` with `"kind": "webhook"`, a `name` and your receiver's `https` `url` (`manage` scope); its answer holds the sink's `id` and a `signing_secret` shown only once. Submit the plan with `"notify": {"sink_id": ID, "events": []}` (`[]` is every public event). Each event then arrives as one `application/x-ndjson` line of `"type": "compute_event"` and `"schema": "weights.compute-event/v1"`, signed as spans are: `X-Weights-Signature: sha256=` and the hex HMAC-SHA256 of `X-Weights-Timestamp`, a dot and the raw body, keyed with the secret. Delivery is at least once, oldest first: key on `event_id`. A standing plan (`scavenger_stream` or `piggyback`) waits unbilled and starts nothing itself, so an `open_stream` stage can be fed wave by wave from its own `pack_completed` events: register the next packs, then seal. The Python SDK's `verify_webhook` checks a delivery; `weights sinks` and `weights compute` make these calls from a shell. For an active `awow_harness_lease` stage, use the account token with `POST https://weights.fyi/run/v1/compute/plans/{plan_id}/stages/{stage_id}/complete` and the result object directly, or `POST https://weights.fyi/run/v1/compute/plans/{plan_id}/stages/{stage_id}/fail` with a nonempty `reason` of at most 4,096 UTF-8 bytes. A failure ends that stage and cancels only the stages that depend on it; independent stages keep running, and the plan ends `failed` once they finish. A reason that starts with `INPUT_STAGING_FAILED` or `PLATFORM_OOM` does not fail the stage while it has attempts left (`max_attempts`, default 3): it goes back in line. Identical completion results replay safely; terminal failure retries preserve the first outcome. These are separate from managed stream completion. Plan and pack replay uses identifiers and normalized content, not `Idempotency-Key`. Preserve both after a lost response. `429 stream_backpressure` has no `Retry-After`: poll backlog and wait for active work to drain. All plan and pack JSON bodies are limited to 1 MiB. `byte_range: [start, end]` is end exclusive; `sha256` and `compressed_bytes` describe the fetched range before decompression. JIT mounts need a byte digest even when an `hf` revision is present; an object digest suffix can replace `sha256` only for a whole-object read. Record-pack execution accepts JSON lines, optionally Zstandard-compressed, and checks the nonblank line count. Use complete compressed frames and stay within the 512 MiB decompressed pack limit. The broader format catalog does not make columnar files valid record packs. HTTPS sources may use signed capability URLs with query parameters. Reads are anonymous apart from the URL, follow only public HTTPS destinations, and do not accept custom authorization headers. Keep signed URLs valid until execution. `gs`, `az`, `abfss` and `hf` use anonymous HTTPS reads; private objects need a suitable signed HTTPS URL. OCI artifacts require prestaging, even when their probe passes. Chat and classification calls take input in the request; training reads a dataset made with `POST https://weights.fyi/run/v1/datasets`. ## More - The LLM guide for people: `https://weights.fyi/run/docs/llm` - The chat reference: `https://weights.fyi/run/docs/reference/chat-completions`; the drop-in call: `https://weights.fyi/run/docs/reference/proxy-chat-completions` - Serving a model from your own workers: `https://weights.fyi/run/docs/your-model` - Usage, charges and receipts: `https://weights.fyi/run/docs/reference/usage` - The data-in-place reference: `https://weights.fyi/run/docs/reference/compute-capabilities` - The Python SDK (`weights.sdk`) that builds and submits plans: `https://weights.fyi/run/docs/sdk` - Checking a plan before submission: `https://weights.fyi/run/docs/reference/compute-plans-dry-run` - Plan submission: `https://weights.fyi/run/docs/reference/compute-plans-create` - Plan receipts: `https://weights.fyi/run/docs/reference/compute-plans-get` - Plan promotion: `https://weights.fyi/run/docs/reference/compute-plans-promote` - Consolidating dated plans into one continuous plan: `https://weights.fyi/run/docs/reference/compute-plans-consolidate` - Prepared-pack materialization: `https://weights.fyi/run/docs/reference/compute-stages-materialize` - Harness completion and failure: `https://weights.fyi/run/docs/reference/compute-stages-complete`, `https://weights.fyi/run/docs/reference/compute-stages-fail` - Event polling: `https://weights.fyi/run/docs/reference/compute-events` - Pack registration and source checks: `https://weights.fyi/run/docs/reference/streams-packs-create` - Backlog and lazy preparation: `https://weights.fyi/run/docs/reference/streams-packs-list` - Completion receipts: `https://weights.fyi/run/docs/reference/streams-packs-complete` - Sealing: `https://weights.fyi/run/docs/reference/streams-seal` - Source errors: `https://weights.fyi/run/docs/errors#source-verification` - The OpenAPI description of every customer call: `https://weights.fyi/run/openapi.json` - Operating the platform (its status, the plan of the queue, flushing it under a budget) is not a customer task and takes an operator's token: the operator's guide is `https://weights.fyi/run/docs/operate`, and the operator's calls are described at `GET https://weights.fyi/run/v1/operator/openapi.json`, which is not part of the customer description above - This file: `https://weights.fyi/run/llms.txt`, also at `https://weights.fyi/run/.well-known/llms.txt`; every docs page in one file: `https://weights.fyi/run/llms-full.txt`; any docs page as Markdown: its address plus `.md` (the index below lists them all) ## Documentation index Every docs page is Markdown at the address below; all of them in one file: `https://weights.fyi/run/llms-full.txt`. ### Overview - Documentation: `https://weights.fyi/run/docs.md` - How it works: `https://weights.fyi/run/docs/how-it-works.md` — The service from first principles: models, jobs, runs, the move to new hardware. - Service capabilities: `https://weights.fyi/run/docs/what-is-live.md` — What is live, merged, pending or designed, with the date of each. ### Use the service - Start here: `https://weights.fyi/run/docs/start.md` — A workspace, an API key, billing and your first call, step by step. - Teams and workspaces: `https://weights.fyi/run/docs/teams.md` — Create a workspace, invite teammates, set roles and switch between teams. - Workspace billing: `https://weights.fyi/run/docs/billing.md` — Pay for shared workspace usage, manage limits and review monthly invoices. - Models and capabilities: `https://weights.fyi/run/docs/models.md` — Choose decision and LLM models, inspect their capabilities, and make a first call. - Classify pages: `https://weights.fyi/run/docs/classify.md` — Send pages to the classifier one call at a time, or as a batch of any size. - Jobs, progress and results: `https://weights.fyi/run/docs/jobs.md` — Follow a job, read every result exactly once, and what a move to new hardware looks like. - Python SDK: `https://weights.fyi/run/docs/sdk.md` — Declare a ComputePlan in Python, admit it in one call, and follow its streams and packs. - Prices and billing: `https://weights.fyi/run/docs/prices.md` — What a job costs, what the quote includes, and how credit and spend caps work. - Errors and limits: `https://weights.fyi/run/docs/errors.md` — Every error code and limit, and how to retry without making work twice. ### Train - Fine-tune a model: `https://weights.fyi/run/docs/fine-tune.md` — Train the classifier on your own labelled pages: datasets, training jobs, checkpoints. - Bring your own model: `https://weights.fyi/run/docs/your-model.md` — The models you can run and train today, and how your own are meant to run. ### Observe - Tracing and exports: `https://weights.fyi/run/docs/tracing.md` — Traces of every job, the job log, downloads, your own destinations, content logging. ### Language models - LLM endpoints: `https://weights.fyi/run/docs/llm.md` — Create, edit and connect language model endpoints. ### Operate - Operate the platform: `https://weights.fyi/run/docs/operate.md` — Run the platform as its operator: read its status, preview what the queue needs, and authorize spend under a budget. ### API Overview - Introduction: `https://weights.fyi/run/docs/api/introduction.md` — The base URL, what requests and answers look like, and a first call. - Authentication: `https://weights.fyi/run/docs/api/authentication.md` — API keys as bearer tokens, their scopes, and the refusals a key can get. - Errors: `https://weights.fyi/run/docs/api/errors.md` — The refusal envelope, what each status asks of you, and retrying without doing work twice. - Rate limits: `https://weights.fyi/run/docs/api/rate-limits.md` — How fast a key may send work, its daily spend cap, and what a 429 says. - All calls: `https://weights.fyi/run/docs/reference.md` — Every call of the API, one page each, grouped by resource. ### Account and keys - List API tokens (`GET /v1/tokens`): `https://weights.fyi/run/docs/reference/tokens-list.md` — List your API tokens with their scopes, expiry, spend cap, request rate and today's spend. - Get the calling token (`GET /v1/tokens/self`): `https://weights.fyi/run/docs/reference/tokens-self.md` — Who the calling token is: its id, scopes, expiry and account, without manage. - Create an API token (`POST /v1/tokens`): `https://weights.fyi/run/docs/reference/tokens-create.md` — Make a token with the scopes, expiry and daily spend cap you choose; shown once. - Revoke an API token (`DELETE /v1/tokens/{token_id}`): `https://weights.fyi/run/docs/reference/tokens-revoke.md` — Turn a token off for good. - List your own API tokens (`GET /v1/tokens/mine`): `https://weights.fyi/run/docs/reference/tokens-mine.md` — The tokens you issued, with read only. - Get the key's workspace (`GET /v1/workspaces`): `https://weights.fyi/run/docs/reference/workspaces-get.md` — The key's workspace with its trace switches, destinations, domains and whether its tracing is governed. - Register a workspace (`POST /v1/workspaces`): `https://weights.fyi/run/docs/reference/workspaces-post.md` — Register a workspace from code: find or create it, switch tracing off, make its endpoints. - Claim a workspace domain (`POST /v1/workspaces/domains`): `https://weights.fyi/run/docs/reference/workspaces-domains-create.md` — Claim an email domain for your workspace and get the DNS TXT record to publish. - Verify a workspace domain (`POST /v1/workspaces/domains/{domain}/verify`): `https://weights.fyi/run/docs/reference/workspaces-domains-verify.md` — Check the domain's DNS TXT records and mark the workspace's claim verified. - Set a domain's join mode (`PATCH /v1/workspaces/domains/{domain}`): `https://weights.fyi/run/docs/reference/workspaces-domains-update.md` — Choose whether verified addresses stay invite-only, can join, or join at sign-in. - Remove a workspace domain (`DELETE /v1/workspaces/domains/{domain}`): `https://weights.fyi/run/docs/reference/workspaces-domains-delete.md` — Remove a claimed or verified email domain from your workspace. ### Your workspace - Read the workspace snapshot (`GET /v1/workspace/snapshot`): `https://weights.fyi/run/docs/reference/workspace-snapshot.md` — What your work is doing, waits on, costs and holds, in one read. - Stream the workspace snapshot (`GET /v1/workspace/snapshot/events`): `https://weights.fyi/run/docs/reference/workspace-snapshot-events.md` — The workspace snapshot as server-sent events, one per period. - Read one campaign as one object (`GET /v1/workspace/campaigns/{campaign_id}`): `https://weights.fyi/run/docs/reference/workspace-campaigns-get.md` — One campaign of your workspace as one object: window, timeline, output, charges and failures. - List the workspace's members (`GET /v1/workspace/members`): `https://weights.fyi/run/docs/reference/workspace-members.md` — Your workspace's people, roles, last activity and invitations. - Read the workspace's audit log (`GET /v1/workspace/audit`): `https://weights.fyi/run/docs/reference/workspace-audit.md` — What was done in your workspace, by whom, oldest first within a page. - Release orphaned holds (`POST /v1/reservations/release-orphaned`): `https://weights.fyi/run/docs/reference/reservations-release-orphaned.md` — Return to your credit every pack hold nothing can settle any more. ### Credit and usage - Open a payment page for credit (`POST /v1/credit/topups`): `https://weights.fyi/run/docs/reference/credit-topups-create.md` — Open a payment page for an amount of credit. - Get your balance and usage (`GET /v1/usage`): `https://weights.fyi/run/docs/reference/usage.md` — Your balance, what you can spend now, and the cost of each job. - Download every credit and charge as CSV (`GET /v1/usage.csv`): `https://weights.fyi/run/docs/reference/usage-csv.md` — Every credit and charge of your account as one CSV file. - Check or hold an amount of credit (`POST /v1/reservations`): `https://weights.fyi/run/docs/reference/credit-holds-create.md` — Ask whether an amount can be reserved against your credit and a plan's budget, or hold it. - List your credit holds (`GET /v1/reservations`): `https://weights.fyi/run/docs/reference/credit-holds-list.md` — The amounts your account holds reserved, or one hold by its id. - Release a credit hold (`DELETE /v1/reservations`): `https://weights.fyi/run/docs/reference/credit-holds-release.md` — Return a held amount to your credit and to its plan's budget. ### Models and quotes - List models (`GET /v1/models`): `https://weights.fyi/run/docs/reference/models.md` — The models you can run or train, your own fine-tuned models included. - Get a model (`GET /v1/models/{model}`): `https://weights.fyi/run/docs/reference/models-get.md` — One model of your list by its id, the way OpenAI's model retrieval answers. - Register a model version (`POST /v1/models/{model}/versions`): `https://weights.fyi/run/docs/reference/models-versions-create.md` — Register a trained version of a specialist model by its digests and metrics. - List a model's versions (`GET /v1/models/{model}/versions`): `https://weights.fyi/run/docs/reference/models-versions-list.md` — A specialist's registered versions, newest first, and which one serves. - Get a model version (`GET /v1/models/{model}/versions/{version_id}`): `https://weights.fyi/run/docs/reference/models-versions-get.md` — One registered version: its digests, metrics, aliases and whether it can be executed. - Promote a version to champion (`POST /v1/models/{model}/promote`): `https://weights.fyi/run/docs/reference/models-promote.md` — Make a registered version the one that serves, when it passes the promotion gate. - Set a model's aliases (`POST /v1/models/{model}/aliases`): `https://weights.fyi/run/docs/reference/models-aliases.md` — Set champion, challenger and previous in one compare-and-swap step. - Get a version's bundle (`GET /v1/models/{model}/bundle`): `https://weights.fyi/run/docs/reference/models-bundle.md` — Download the package a version was registered with, the serving one by default. - Get a model's attestation (`GET /v1/models/{model}/attestation`): `https://weights.fyi/run/docs/reference/models-attestation.md` — Live evidence that a confidential model runs inside an isolated enclave. - Get a price quote (`GET /v1/quote`): `https://weights.fyi/run/docs/reference/quote.md` — What a job of so many pages costs before you send it, and what that rests on. - Get the model's state (`GET /v1/endpoint`): `https://weights.fyi/run/docs/reference/endpoint.md` — The model's state right now and when it is expected to be ready. - Warm the model (`POST /v1/endpoint/warm`): `https://weights.fyi/run/docs/reference/endpoint-warm.md` — Ask for the model to be made ready ahead of your work. - List the service's capabilities (`GET /v1/capabilities`): `https://weights.fyi/run/docs/reference/capabilities.md` — What the service does and does not do yet, in one answer. ### Classify - Classify pages (`POST /v1/classify`): `https://weights.fyi/run/docs/reference/classify.md` — Classify up to a call's worth of pages, with the results in the answer when the model is ready. ### Jobs and results - Create a batch or training job (`POST /v1/jobs`): `https://weights.fyi/run/docs/reference/jobs-create.md` — Send a batch of pages of any size as one job, as JSON or as NDJSON. - Estimate a job before sending it (`POST /v1/jobs/estimate`): `https://weights.fyi/run/docs/reference/jobs-estimate.md` — Work out a job's duration, data volume, fit and planning cost before you send it; nothing is reserved. - List jobs (`GET /v1/jobs`): `https://weights.fyi/run/docs/reference/jobs-list.md` — Your jobs, newest first, each with its progress and cost. - Get a job (`GET /v1/jobs/{job_id}`): `https://weights.fyi/run/docs/reference/jobs-get.md` — One job: its status, progress, the model's state, its cost and its runs. - Cancel a job (`DELETE /v1/jobs/{job_id}`): `https://weights.fyi/run/docs/reference/jobs-cancel.md` — Stop a job: pages not yet sent are cancelled; a training job stops cleanly. - Read job results (`GET /v1/jobs/{job_id}/results`): `https://weights.fyi/run/docs/reference/jobs-results.md` — A job's results in page order, read exactly once with a cursor. - Download job results as NDJSON (`GET /v1/jobs/{job_id}/results.ndjson`): `https://weights.fyi/run/docs/reference/jobs-results-ndjson.md` — A page job's results as one NDJSON download. ### Datasets - Create a dataset (`POST /v1/datasets`): `https://weights.fyi/run/docs/reference/datasets-create.md` — Make a dataset and get the address its file goes to. - Upload a dataset file (`PUT /v1/datasets/{dataset_id}/content`): `https://weights.fyi/run/docs/reference/datasets-upload.md` — Stream the dataset's NDJSON file; each line checked, nothing of it logged. - List datasets (`GET /v1/datasets`): `https://weights.fyi/run/docs/reference/datasets-list.md` — Your datasets with their counts, digests and the jobs that used them. - Get a dataset (`GET /v1/datasets/{dataset_id}`): `https://weights.fyi/run/docs/reference/datasets-get.md` — One dataset. - Delete a dataset (`DELETE /v1/datasets/{dataset_id}`): `https://weights.fyi/run/docs/reference/datasets-delete.md` — Remove a dataset that no open job uses. ### Compute plans and streams - Describe accepted sources and formats (`GET /v1/compute/capabilities`): `https://weights.fyi/run/docs/reference/compute-capabilities.md` — The source URI schemes, data formats and readers available for plans and streams. - List the command-line seat lanes (`GET /v1/seats/leases`): `https://weights.fyi/run/docs/reference/seats-leases.md` — The command-line seat lanes, which a plan can lease now, and what your workers offer for each. - Submit a compute plan (`POST /v1/compute/plans`): `https://weights.fyi/run/docs/reference/compute-plans-create.md` — Submit stages with dependencies, a schedule, a budget and optional source checks. - Dry-run a compute plan (`POST /v1/compute/plans/dry-run`): `https://weights.fyi/run/docs/reference/compute-plans-dry-run.md` — Check a plan against the plan rules and its models' pinned releases without admitting it. - List compute plans (`GET /v1/compute/plans`): `https://weights.fyi/run/docs/reference/compute-plans-list.md` — List your plans newest first, filtered by state, wake policy or QoS, page by page. - Get a compute plan (`GET /v1/compute/plans/{plan_id}`): `https://weights.fyi/run/docs/reference/compute-plans-get.md` — Read a plan's state, stage progress, accrued cost and latest event sequence. - Promote a standing plan (`POST /v1/compute/plans/{plan_id}/promote`): `https://weights.fyi/run/docs/reference/compute-plans-promote.md` — Promote a standing plan to standard scheduling while preserving its progress. - Cancel a compute plan (`POST /v1/compute/plans/{plan_id}/cancel`): `https://weights.fyi/run/docs/reference/compute-plans-cancel.md` — Cancel your plan, fence its leases and release its capacity demand. - Consolidate superseded plans into a plan (`POST /v1/compute/plans/{plan_id}/consolidate`): `https://weights.fyi/run/docs/reference/compute-plans-consolidate.md` — Move superseded plans' remaining packs into one continuous plan and end them. - Complete a harness stage (`POST /v1/compute/plans/{plan_id}/stages/{stage_id}/complete`): `https://weights.fyi/run/docs/reference/compute-stages-complete.md` — Complete a harness stage, record its result and release satisfied dependencies. - Fail a harness stage (`POST /v1/compute/plans/{plan_id}/stages/{stage_id}/fail`): `https://weights.fyi/run/docs/reference/compute-stages-fail.md` — Fail a harness stage and cancel the plan's remaining unfinished work. - Retry a stage's dead-lettered packs (`POST /v1/compute/plans/{plan_id}/stages/{stage_id}/packs/retry`): `https://weights.fyi/run/docs/reference/compute-stages-packs-retry.md` — Retry dead-lettered packs with an expected count and durable operation key. - Accept the loss of a stage's dead-lettered packs (`POST /v1/compute/plans/{plan_id}/stages/{stage_id}/packs/accept-loss`): `https://weights.fyi/run/docs/reference/compute-stages-packs-accept-loss.md` — Accept reviewed pack loss with an explicit reason. - Fill a stream's pending lookahead (`POST /v1/compute/plans/{plan_id}/stages/{stage_id}/materialize`): `https://weights.fyi/run/docs/reference/compute-stages-materialize.md` — Fill a stream's pending lookahead from lazy packs, a manifest or templates. - List compute events (`GET /v1/compute/events`): `https://weights.fyi/run/docs/reference/compute-events.md` — Read plan events in sequence and resume monitoring with a saved cursor. - Register a pack (`POST /v1/streams/{stage_id}/packs`): `https://weights.fyi/run/docs/reference/streams-packs-create.md` — Register a runnable pack or lazy pointer, or promote a prepared lazy pack. - Read a stream's backlog (`GET /v1/streams/{stage_id}/packs`): `https://weights.fyi/run/docs/reference/streams-packs-list.md` — Read backlog counts, available room and the next lazy packs to prepare. - Get a pack (`GET /v1/streams/{stage_id}/packs/{pack_id}`): `https://weights.fyi/run/docs/reference/streams-packs-get.md` — Read one registered pack's persisted state and output receipt. - Upload a pack's content (`PUT /v1/streams/{stage_id}/packs/{pack_id}/content`): `https://weights.fyi/run/docs/reference/streams-packs-content-put.md` — Upload a pack's bytes with the API key alone and register it runnable. - List a stream's completed outputs (`GET /v1/streams/{stage_id}/outputs`): `https://weights.fyi/run/docs/reference/streams-outputs-list.md` — List a stream's completed packs in ordinal order, page by page. - Download a pack's output (`GET /v1/streams/{stage_id}/packs/{pack_id}/output`): `https://weights.fyi/run/docs/reference/streams-packs-output-get.md` — Read a completed pack's output or manifest, whole or by byte range. - Complete a harness pack (`POST /v1/streams/{stage_id}/packs/{pack_id}/complete`): `https://weights.fyi/run/docs/reference/streams-packs-complete.md` — Record a leased harness pack's output receipt with safe identical retries. - Retry a stream's dead-lettered packs (`POST /v1/streams/{stage_id}/packs/retry`): `https://weights.fyi/run/docs/reference/streams-packs-retry.md` — Retry a stream's dead-lettered packs, addressed by stream identifier. - Accept loss of a stream's dead-lettered packs (`POST /v1/streams/{stage_id}/packs/accept-loss`): `https://weights.fyi/run/docs/reference/streams-packs-accept-loss.md` — Accept a stream's reviewed pack loss, addressed by stream identifier. - Seal a stream (`POST /v1/streams/{stage_id}/seal`): `https://weights.fyi/run/docs/reference/streams-seal.md` — Close a stream to new packs while its registered work finishes. ### Fine-tuning - Create a batch or training job (`POST /v1/jobs`): `https://weights.fyi/run/docs/reference/jobs-create-finetune.md` — Start a training job on your dataset; admitted against its estimate. - Get a price quote (`GET /v1/quote`): `https://weights.fyi/run/docs/reference/quote-finetune.md` — What a training job costs before you start it. - Quote a training job with its options (`POST /v1/quote`): `https://weights.fyi/run/docs/reference/quote-finetune-post.md` — What a training job costs with the options you would create it with. - Download a trained model (`GET /v1/jobs/{job_id}/model.safetensors`): `https://weights.fyi/run/docs/reference/jobs-model.md` — Download the weights a training job made, checked against their digest. - Measure a model (`POST /v1/models/{model}/measure`): `https://weights.fyi/run/docs/reference/models-measure.md` — Measure a model not yet priced per token, charged for the job's own working time (pending; run 2). ### LLM endpoints - Create an LLM endpoint (`POST /v1/endpoints`): `https://weights.fyi/run/docs/reference/endpoints-create.md` — Create your endpoint for a language model. - List LLM endpoints (`GET /v1/endpoints`): `https://weights.fyi/run/docs/reference/endpoints-list.md` — Your LLM endpoints with their state, hold and cost today. - Read an LLM endpoint (`GET /v1/endpoints/{endpoint}`): `https://weights.fyi/run/docs/reference/endpoints-get.md` — One endpoint: ready or not, the estimate, your place in line, its runs. - Rename or describe an endpoint (`PATCH /v1/endpoints/{endpoint}`): `https://weights.fyi/run/docs/reference/endpoints-update.md` — Edit an endpoint name and description. - Hold an endpoint ready (`POST /v1/endpoints/{endpoint}/ready`): `https://weights.fyi/run/docs/reference/endpoints-ready.md` — Start your endpoint now and hold it ready until a time you set. - Release an endpoint (`DELETE /v1/endpoints/{endpoint}`): `https://weights.fyi/run/docs/reference/endpoints-release.md` — End the hold; the model stops after its idle time. - Read an endpoint's usage (`GET /v1/endpoints/{endpoint}/usage`): `https://weights.fyi/run/docs/reference/endpoints-usage.md` — Your endpoint's calls, tokens, time ready and cost, per day and per run. - Reserve a hold for a run (`PUT /v1/endpoints/{endpoint}/reservations/{reservation}`): `https://weights.fyi/run/docs/reference/reservations-put.md` — Hold an endpoint for one scheduled run, independently of other holds. - Read a run's hold (`GET /v1/endpoints/{endpoint}/reservations/{reservation}`): `https://weights.fyi/run/docs/reference/reservations-get.md` — Read one run's hold and current readiness. - Release a run's hold (`DELETE /v1/endpoints/{endpoint}/reservations/{reservation}`): `https://weights.fyi/run/docs/reference/reservations-release.md` — Release one run's hold without ending another. - Create a chat completion (`POST /v1/chat/completions`): `https://weights.fyi/run/docs/reference/chat-completions.md` — Chat with your own LLM endpoint in OpenAI's shape; a move to new hardware is carried for you. - Create a drop-in chat completion (`POST /v1/proxy/chat/completions`): `https://weights.fyi/run/docs/reference/proxy-chat-completions.md` — The chat call for an unchanged OpenAI client: no endpoint to create first. - List proxy models (`GET /v1/proxy/models`): `https://weights.fyi/run/docs/reference/proxy-models-list.md` — OpenAI's model list at the drop-in base address. - Read a proxy model (`GET /v1/proxy/models/{model}`): `https://weights.fyi/run/docs/reference/proxy-models-get.md` — OpenAI's single-model retrieval at the drop-in base address. ### Your own workers - Create a worker join token (`POST /v1/nodes/join-tokens`): `https://weights.fyi/run/docs/reference/workers-join-tokens-create.md` — Make the single-use token that enrolls one worker of your own into the workspace. - Revoke a worker join token (`POST /v1/nodes/join-tokens/{join_token_id}/revoke`): `https://weights.fyi/run/docs/reference/workers-join-tokens-revoke.md` — Turn off a join token no worker has used yet. - List your enrolled workers (`GET /v1/nodes`): `https://weights.fyi/run/docs/reference/workers-list.md` — Your enrolled workers, the models each offers and whether it is connected. - Revoke a worker (`POST /v1/nodes/{node_id}/revoke`): `https://weights.fyi/run/docs/reference/workers-revoke.md` — End a worker's enrollment for good and close its connections. - Pause a worker (`POST /v1/nodes/{node_id}/pause`): `https://weights.fyi/run/docs/reference/workers-pause.md` — Offer a worker none of your calls until you resume it; what it took finishes. - Drain a worker (`POST /v1/nodes/{node_id}/drain`): `https://weights.fyi/run/docs/reference/workers-drain.md` — Let a worker answer what it holds and stop, so its computer can be switched off. - Resume a worker (`POST /v1/nodes/{node_id}/resume`): `https://weights.fyi/run/docs/reference/workers-resume.md` — Offer a paused or drained worker your calls again. - Publish a worker's model offer (`POST /v1/nodes/{node_id}/offers/{model}/publish`): `https://weights.fyi/run/docs/reference/workers-offers-publish.md` — Route your workspace's calls for a model to a worker and make its endpoint. ### Tracing and exports - Get a job's log (`GET /v1/jobs/{job_id}/logs`): `https://weights.fyi/run/docs/reference/jobs-logs.md` — A job's spans and events in order, with each page's result if you ask. - Export your spans as OTLP JSON (`GET /v1/traces`): `https://weights.fyi/run/docs/reference/traces.md` — Your spans for a period as one OpenTelemetry JSON download. - List trace destinations (`GET /v1/trace-sinks`): `https://weights.fyi/run/docs/reference/trace-sinks-list.md` — Your trace destinations, with what was delivered and what waits. - Add a trace destination (`POST /v1/trace-sinks`): `https://weights.fyi/run/docs/reference/trace-sinks-create.md` — Add a destination: OpenTelemetry over HTTP, MLflow or a signed webhook. - Remove a trace destination (`DELETE /v1/trace-sinks/{sink_id}`): `https://weights.fyi/run/docs/reference/trace-sinks-delete.md` — Remove a destination and what still waited for it. - Send a test span to a destination (`POST /v1/trace-sinks/{sink_id}/test`): `https://weights.fyi/run/docs/reference/trace-sinks-test.md` — Send one test span to a destination and see what came back. - Get the content logging switches (`GET /v1/trace-preferences`): `https://weights.fyi/run/docs/reference/trace-preferences-get.md` — Whether inputs and outputs of new jobs are logged, and the limits. - Set the content logging switches (`PUT /v1/trace-preferences`): `https://weights.fyi/run/docs/reference/trace-preferences-put.md` — Turn logging of inputs and outputs on or off. - Read a job's logged inputs and outputs (`GET /v1/jobs/{job_id}/trace-content`): `https://weights.fyi/run/docs/reference/jobs-trace-content.md` — Read the logged inputs and outputs of one job. - Delete all logged inputs and outputs (`DELETE /v1/trace-content`): `https://weights.fyi/run/docs/reference/trace-content-delete.md` — Delete every logged input and output of your account.