This quickstart makes one real Anthropic, OpenAI or OpenRouter request through STACK. The provider credential stays in STACK's vault while the gateway checks the agent's access, issues a short-lived Passport and records the result.
Create your STACK account, then connect an LLM provider in Connect. You do not need to connect an AI client for this flow.
Run this in a terminal:
npx @getstackrun/cli auth loginThe command opens a browser for approval, then stores the CLI refresh token in your local STACK profile. It does not ask for the LLM provider credential.
In the same terminal, run:
npx @getstackrun/cli quickstart --provider anthropicUse openai or openrouter instead when that is the provider you connected. The command creates a proxy-only, logged, STACK-managed agent or reuses an existing agent with that exact posture, grants it access to the selected provider, issues a Passport and makes one small model request. It then prints the latest audit entry for that agent so you can see that the request passed through STACK.
The provider can charge for the request. On self-serve plans, STACK charges a gateway fee equal to 15% of the calculated provider cost; Enterprise pricing is negotiated separately. The request also counts as one recorded action.
After the quickstart works, proxy serve can place a local STACK gateway in front of a tool that accepts a custom model-provider URL:
npx @getstackrun/cli proxy serve --agent quickstart-bot --provider anthropicPoint the tool at:
http://127.0.0.1:8788The shim accepts Anthropic Messages requests at /v1/messages and OpenAI-compatible Chat Completions requests at /v1/chat/completions. STACK verifies the Passport, applies the agent's access rules, injects the provider credential and records the result.
A STACK-managed agent uses the CLI's operator sign-in to issue Passports. The provider key remains in STACK, but the machine still holds the STACK refresh token. Use a customer-managed agent when the runtime should hold only its own agent key.
The endpoint listens only on the local machine by default. Do not expose it to a network without authentication and a firewall.
STACK can redact supported PII patterns and add the agent's current Passport context before sending a request.
Pattern-based redaction can miss sensitive data or redact harmless text. Do not send data that the model does not need. If redaction is disabled, supported user content reaches the provider without STACK redaction.
Use the JavaScript or Python SDK when your application calls the gateway directly.
The API reference covers supported endpoints, streaming, Passport requirements, request limits, billing, errors, and usage records.