---
title: How do you restrict models and rate limits per OpenAI API project?
url: https://opencontroller.lyzr.com/blog/restrict-models-in-openai-api-projects
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# How do you restrict models and rate limits per OpenAI API project?

**Create one OpenAI API project per team or agent, then use that project's Limits settings to allow only approved models and set per-model rate limits below your organisation's limits. Issue service account keys with the narrowest permission level, and treat the project budget as an alert rather than a hard stop. That gives you per-project control, but not per-agent policy across providers.**

Projects are the main isolation unit in the OpenAI API platform. Each project has its own API keys, members, service accounts, usage reporting and limits. If every agent shares one default project and one key, you cannot tell which agent called which model, and you cannot restrict one without restricting all.

## What can you control at the project level?

| Control | Where it lives | What it does | Governance note |
|---|---|---|---|
| Allowed models | Project → Limits | Allow or block specific models for the project | Blocks calls to unapproved models at the API |
| Rate limits | Project → Limits | Per-model limits on requests and tokens per minute | Cannot exceed organisation limits |
| Budget | Project → Limits | Monthly spend threshold with notifications | OpenAI has documented it as an alert, not a hard cap |
| API keys | Project → API keys | Permissions of All, Restricted (per endpoint) or Read only | Use Restricted for agents |
| Service accounts | Project → Members | A non-human identity with its own key | Keys survive when people leave |
| Member roles | Project → Members | Owner or Member | Owners change limits; members use keys |

Admins can also manage projects, members, service accounts, API keys and project rate limits through the OpenAI Admin API, and the Usage API can group usage by project and by API key.

## How should you structure projects for AI agents?

A workable pattern for most enterprises:

1. **One project per production agent or agent family.** If an agent has a different risk level, owner or budget, give it its own project.
2. **Separate dev and prod projects.** Let developers try new models in dev. Keep prod limited to the models that passed your evaluations.
3. **Use a service account per agent.** A human's personal key should never be the credential a production agent runs on.
4. **Set Restricted permissions.** Grant only the endpoints the agent uses (for example, Responses and Files), not All.
5. **Allow-list models.** Approve specific model versions; block everything else.
6. **Set rate limits per model.** Start near expected peak plus a margin, so a looping agent hits a ceiling quickly.
7. **Set a budget and notification thresholds.** Route alerts to the agent's owner, not a shared inbox.
8. **Record the mapping.** Keep project ID, service account, owner and agent name together in your agent registry.

## Where does project-level control stop?

Project settings are strong at the OpenAI boundary. They do not cover everything an agent governance programme needs.

- **Soft budgets.** A budget that only notifies will not stop a runaway agent overnight. Rate limits are the closer thing to a ceiling.
- **One provider only.** Agents that also call Anthropic, Amazon Bedrock, Google or internal models need equivalent controls in each place. See [how to rate limit AI agents](/blog/how-to-rate-limit-ai-agents).
- **No content policy.** Allowed-model lists do not redact PII, check groundedness or block risky tool calls.
- **Key sprawl.** Many projects mean many keys. Without rotation and ownership, you trade one shared key for fifty forgotten ones.
- **No version view.** Projects know keys and models, not agent versions. Cost per agent version needs a tag at request time.

## How do you check the setup is working?

Run these checks each quarter:

- List every project and confirm each has a named owner and a matching registry entry.
- List API keys with All permissions; downgrade or justify each one.
- Find keys owned by people who have left; rotate them to service accounts.
- Compare the allowed-model list with the models your evaluation team has approved.
- Pull usage grouped by project and API key and look for keys with no known agent.

For cost reporting by project, see [how to track OpenAI API costs by project](/blog/track-openai-api-costs-by-project).

## How Opencontroller does this

Opencontroller auto-discovers models and API keys across AWS, Azure and Google Cloud and connects to OpenAI Enterprise workspaces, so keys and agents land in one governed registry with owners. Its LLM Gateway (Lyzr Gateway) exposes an OpenAI-compatible endpoint with routing, fallback and retry, caching and cost attribution per agent and per version, so the same model and spend policy applies across providers, not just inside one OpenAI project. It is one layer of an [AI agent control plane](/blog/what-is-an-ai-agent-control-plane); for the wider pattern see [how to govern AI agents across platforms](/blog/how-to-govern-ai-agents-across-platforms). To see it on your estate, [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can an OpenAI project budget stop requests when it is reached?**
OpenAI has documented project budgets as notification thresholds rather than a hard cap. Use per-model rate limits and monitoring if you need a ceiling, and confirm current behaviour in your console.

**Should every AI agent have its own OpenAI project?**
Not always. Give an agent its own project when it has a different owner, risk level or budget. Low-risk agents with one owner can share a project if each has its own service account key.

**Can I manage project limits through an API?**
The Admin API covers projects, members, service accounts, API keys and project rate limits. Check the current API reference for which limit settings it exposes.

## Key facts

OpenAI API projects isolate API keys, members, service accounts, usage and limits. Project Limits can allow or block specific models, set per-model rate limits below organisation limits, and set a monthly budget that OpenAI has documented as a notification threshold rather than a hard cap. API keys can have All, Restricted or Read only permissions. Opencontroller discovers models and API keys, connects to OpenAI Enterprise workspaces, and its LLM Gateway attributes cost per agent and per version across providers. Pricing starts from $250K per deployment per year.

## Related

- [How do you track OpenAI API costs by project with the Usage and Costs APIs?](https://opencontroller.lyzr.com/blog/track-openai-api-costs-by-project.md)
- [How do you rate-limit AI agents?](https://opencontroller.lyzr.com/blog/how-to-rate-limit-ai-agents.md)
- [How do you set budgets and alerts for AI agent spend?](https://opencontroller.lyzr.com/blog/set-budgets-and-alerts-for-ai-agent-spend.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
