Projects
Projects are the organizational unit in Gateway. Every project has a unique ID, its own budget, routing policy, and compression settings. Requests are scoped to a project with a project API key, the project_id body field, or the X-Project-Id header. Projects are the foundation: routing, compression, budgeting, and spend tracking all attach to a project.
What you can do with projects
- Set budgets: dollar limit and billing period. Gateway tracks spend and alerts or blocks at thresholds. See Cost governance and savings for details.
- Configure routing: org default or project-specific override. See Routing policies.
- Configure compression: org default or project-specific override. See Context compression.
- Track spend: per-project view in the dashboard, with managed vs BYOK spend and model/provider breakdowns
- Issue project API keys: keys created from the project’s API keys tab attribute every request to the project automatically
- Apply tags: attach key-value tags via headers or API keys to drive tag-based routing rules and spend tracking by tag
Creating a project
Create a project from the Gateway dashboard using the four-step wizard:
- Details: name, slug (unique per org), and optional description. After creation, the project’s ID (a UUID, used as the
project_idvalue in requests) is shown on the project’s Overview tab. - Budget: amount (USD), period (daily, weekly, monthly, quarterly, or yearly), enforcement mode (soft or hard), and alert thresholds. You can skip this step and add a budget later.
- Routing: use the org default or set a project-specific override, choosing a fallback or intelligent strategy
- Compression: use the org default or set a project-specific override (disabled, context window only, or cost optimization with a target ratio slider)
All settings are editable after creation. Projects can be deactivated without deleting.
Scoping requests to a project
There are three ways to attach a request to a project. Pick the first that fits your setup:
- Project API key. Create a key from the project’s API keys tab in the dashboard. Every request made with that key attributes to the project automatically, so its routing policy and budget apply with no per-request configuration. This is the right choice for coding agents and IDEs (Claude Code, Codex, Cursor), where you control the key but not the request body.
project_idbody field. Keep an organization key and pass the project’s ID per request. Supported on/v1/responsesand the OpenAI-compatible (/v1/openai) and AI SDK (/v1/ai-sdk) endpoints. Use this when one service talks to several projects with a single key.X-Project-Idheader. The same value as an HTTP header. Use it on endpoints without the body field (the Anthropic-compatible/v1/anthropic), or when your client only lets you add headers.
The project’s ID is a UUID, shown on the project’s Overview tab. If a request carries both, the body field wins over the header. A project API key’s project can’t be overridden per request; a conflicting project_id is rejected with 400 project_mismatch.
When a request resolves to a project, Gateway uses that project’s routing policy if one is set; otherwise it falls back to the org default. See Using routing policies for the full resolution order. Without any project reference, requests use org-level defaults and spend is tracked at the org level.
Budgets
Each project can have a budget that caps spend for a billing period: soft limits alert at thresholds (50%, 80%, and 90% by default), hard limits block requests with HTTP 402 once exceeded. Budget changes can take up to an hour to take effect in enforcement, and the dashboard shows color-coded progress per project. See Budgets for how project budgets relate to org caps, per-key limits, and customer budgets.
For complete coverage of budgets, billing, and cost-saving strategies, see Cost governance and savings
Tags
Tags are key-value pairs defined at the org level. They serve two purposes:
- Routing: use tags as conditions in tag-based routing rules. For example, route requests tagged
customer_tier: enterpriseto a quality-first policy. See Routing policies for configuration details. - Spend tracking: view spend broken down by tag in the dashboard’s “By Tag” tab
The dashboard includes quick-fill templates for common tags like customer_tier, environment, and region.
FAQ
Can I have multiple projects?
Yes. Separate projects by environment, team, or product feature to get independent budgets, routing, and spend tracking for each.
What happens if I don't specify a project?
Requests use org-level defaults for routing and compression. Spend is tracked at the org level and not attributed to any project.
Can I change a project's ID after creation?
No. The ID is used in API requests and spend tracking and cannot be changed. The name, slug, and all other settings are editable.
Do I need a separate API key per project?
No. One organization key can target any project via the project_id body field or X-Project-Id header. Project API keys are a convenience: they remove the per-request field for clients you don’t control, and they guarantee the key can only spend against that project.
Can I deactivate a project without deleting it?
Yes. Deactivating a project stops it from accepting requests but retains its configuration and history.
How are tags different from project configuration?
Projects define static configuration: budget, routing policy, and compression settings. Tags are dynamic per-request metadata used for routing decisions and spend tracking within a project.