Skip to main content

Projects page

A project groups some of a team's virtual keys under a budget, a model allowlist and per-model rate limits of its own. The Projects page lists the projects you can see, opens a detail view for each one, and lets permitted users create and edit them. Open it at /ui/projects, under ACCESS CONTROL in the left nav.

The nav item appears only when an admin has turned on [BETA] Enable Projects (page will refresh) on the UI Settings tab of Admin Settings. That setting is a Spanway Enterprise setting, and the backend refuses to save it on a build without the enterprise package. With the setting on, the item is shown to users whose role is Admin, Admin Viewer, Org Admin, Internal User or Internal Viewer and who are also an admin role, an org admin or an admin of at least one team. The page itself has no extra guard, so the URL still opens when the nav item is hidden. In that case the backend still limits what the list returns (see the role section below).

Creating and editing projects needs a Spanway Enterprise license. Reading them does not.

A real-world scenario​

The support team runs two bots from one team, and finance wants their costs apart. The team admin creates a support-bot project with its own 300 dollar budget and model list, and creates the production key inside it, so its spend is tracked and capped on its own.

Steps​

  1. Open Projects under Access Control, or go to /ui/projects, and click Create Project.

  2. Pick the team, name the project, set its models and budget, and click Create Project. The API call is in projects.

  3. Open Virtual Keys, click + Create New Key, pick the project under Project and create the key.

  4. Open the project to see its keys and spend, or read it with the API.

    curl "http://localhost:4000/project/info?project_id=proj-support-bot" -H "Authorization: Bearer $SPANWAY_API_KEY"

Expected result​

"Project created successfully" shows, the key is listed in the project's Keys card, and requests with it count against the project budget.

Projects list​

The header shows Projects with the description "Manage projects within your teams." and a Read the Projects guide link to this page. Create Project appears in the header only for users who can manage projects.

ControlTypeWhat it does
Create ProjectButtonOpens the Create New Project dialog.
Search boxText inputPlaceholder "Search projects by name, ID, description, or team...". Filters the loaded list in the browser by project name, project ID, description or team alias, ignoring case. Kept in the URL as project_search.
Clear searchIcon buttonShown while the search box has text. Empties it.

The table pages and sorts in the browser. It shows 10 rows per page by default, with 10, 25 or 50 to choose from. The page and page size are kept in the URL as page and page_size.

ColumnMeaning
IDThe project ID. Click it to open the project detail view.
NameThe project name, or a dash when it has none. Sortable.
TeamThe owning team's alias. While teams are loading it shows a placeholder, and if the team is not in your team list it shows the raw team ID. Sortable.
ModelsA badge with the number of allowed models. Hover it to see the list, or "No models" when the list is empty.
StatusActive (green) or Blocked (red).
CreatedThe creation date. Sortable.
UpdatedThe date of the last change.
Delete (trash icon)Shown to Admins only. Opens the Delete project confirmation for that row (see below).

Project detail view​

Clicking a project ID adds ?project=<id> to the URL and replaces the list with the detail view. The back arrow returns to the list and resets the keys table filters.

The header shows the project name (or its ID when it has no name), an Active or Blocked badge, the line "ID:" with the project ID, and a copy button ("Copy project ID"). Edit Project appears for users who can manage this project, meaning a non view-only Admin, or an admin of the project's team when team admins hold the projects permission. Delete Project appears next to it for non view-only Admins only.

CardWhat it shows
Project DetailsDescription (or a dash), Created with date, time and "by" the creator, and Last Updated with date, time and "by" the last editor.
BudgetThe project spend in dollars. Under it, "of $X budget" when a max budget above zero is set, or "No budget limit". With a budget, a meter and "N% utilized" are shown. The meter turns to a warning color at 70% and to the over color at 90%.
Spend by ModelReserved for a per-model breakdown. The gateway does not record project spend per model yet, so the card shows "The gateway does not break project spend down by model yet. The Usage page shows spend per model for the project's keys."
KeysThe virtual keys in this project (see below).
TeamThe owning team's alias and ID with a copy button ("Copy team ID"), its models as badges or All models, its spend with " / $budget" or " (Unlimited)" and a meter when it has a budget, and its member count. Shows a spinner while loading and "No team assigned" when the project has no team.

Keys card​

The keys card lists the project's keys, fetched from the gateway one page at a time. It shows 5 rows per page by default, with 5, 10 or 25 to choose from. The filter box ("Filter by key name...") narrows the list by key alias, and its clear button empties it. These settings are kept in the URL with a keys_ prefix.

ColumnMeaning
Key NameThe key alias, or a dash. It links to that key on the Virtual Keys page.
OwnerThe owner's email, or user ID when there is no email. Hover to see the full value.
CreatedThe date the key was created.
Last ActiveThe date the key was last used, or "Never".

The project field on the key form, which assigns a key to a project, is covered on the Virtual Keys page.

Create New Project dialog​

The dialog has a Basic Information section and a collapsed Advanced Settings section.

FieldTypeWhat it does
Project NameText, requiredPlaceholder "e.g. Customer Support Bot". Empty shows "Please enter a project name".
TeamSearchable dropdown, requiredPlaceholder "Search or select a team". Admins can pick any team, everyone else only teams they administer. Empty shows "Please select a team". Changing the team clears the model selection.
DescriptionText areaPlaceholder "Describe the purpose of this project".
Allowed Models (scoped to selected team's models)Multi selectDisabled until a team is picked, with the hint "Select a team first to see available models". Offers All Team Models and the models available to the selected team. Picking All Team Models replaces any other selection.
Max Budget (USD)NumberPlaceholder "0.00", minimum 0. Rounded to cents when saved. The help text says it is the most the project's keys may spend together, that empty means no project cap while the team's budget still applies, and that it cannot be higher than the team's max budget.

Advanced Settings holds these controls.

FieldTypeWhat it does
Block ProjectSwitchOff by default. The help text explains that it stops every key on the project at once, for example while you investigate a leak, without deleting anything, and that turning it off restores access. When on, a warning reads "All API requests using keys under this project will be rejected."
GuardrailsTag input"Select existing guardrails or enter new ones". Suggests the guardrails configured on the gateway and also accepts typed names.
Model-Specific LimitsRepeating rowsThe help text explains TPM (tokens per minute), RPM (requests per minute), Input TPM and Output TPM, and that a request over a cap is refused with 429 until the minute rolls over. Add Model Limit adds a row with Model (placeholder "Model name (e.g. gpt-4)"), TPM Limit, RPM Limit, Input TPM Limit and Output TPM Limit. The minus button removes the row. A row needs a model ("Missing model") and the same model cannot appear twice ("Duplicate model"). Blank limits are left out.
MetadataRepeating rowsAdd Key-Value Pair adds a Key and Value row, and the minus button removes it. Both are required ("Missing key", "Missing value") and keys must be unique ("Duplicate key"). Values are saved as text. When you edit a project, only text, number and true or false values show as rows. Tags, policies and other structured values are not listed and are kept as they are.

Create Project saves the project and Cancel discards the form. On success the toast reads "Project created successfully". On failure the toast shows the server error, or "Failed to create project".

The gateway checks the request again and can refuse it with an error toast. It refuses models that are not in the team's allowed models, a max budget above the team's max budget, and a negative budget. When the gateway has enforce_project_model_quota turned on in its general settings, every allowed model needs a positive RPM limit and a positive TPM limit, and entries that expand at request time (such as All Team Models, wildcards or access groups) are refused. Setting guardrails also needs the guardrails license feature.

Edit Project dialog​

Edit Project opens the same form, titled Edit Project, filled with the project's current values. Guardrails, model limits and metadata are read from the project's metadata.

The Advanced Settings values are sent only if you opened that section during this edit, so saving without opening it leaves guardrails, limits and metadata as they were. When you did open it, removing a model limit row clears that limit on the project. Removing a metadata pair does not delete it, because the gateway merges the metadata you send over the stored metadata, so a key you leave out keeps its stored value. Clearing Max Budget (USD) removes a budget that was set.

You can pick a different Team to move the project. The gateway refuses the move while any key on the project belongs to another team, and you must be allowed to manage projects in both teams.

Save Changes saves and shows "Project updated successfully", or the server error, or "Failed to update project". Cancel closes the dialog.

Delete project confirmation​

Say a pilot project is finished and its keys were already removed, and you want it gone from the list. Open the Projects page, click the trash icon on its row (or open the project and click Delete Project), check the Name and ID shown in the dialog, and click Delete. The dialog closes, the toast reads "Project deleted" and the list refreshes without it.

The same action from the command line, with an Admin key.

curl -X DELETE 'http://localhost:4000/project/delete' \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" \
-H 'Content-Type: application/json' \
-d '{"project_ids": ["project-123"]}'

The response is the list of deleted projects. Deleting is limited to Admins (proxy_admin), so the action is hidden from Admin Viewers, Org Admins and team admins, and the gateway refuses it for anyone else. A project that still has keys attached is refused with a 400 error and nothing is deleted. The dialog stays open and shows the gateway's reason under "Could not delete the project", for example "Project project-123 has 2 attached key(s). Delete or detach them before deleting the project." Delete the keys or move them to another project on the Virtual Keys page, then try again. Cancel closes the dialog without sending anything.

Empty, error and disabled states​

An empty list shows "No projects yet" with "Create a project to organize keys within your teams." A search with no match shows "No matching projects" with "Try a different search term." While loading, the table shows "Loading projects…".

When /project/list fails, the list shows "Couldn't load projects" followed by the reason and "This is not an empty list. Check your connection and permissions, then retry." Retry loads the list again. The detail view shows "Project not found" both when the project does not exist and when you are not allowed to see it or the request fails.

In the keys card, an empty list shows "No keys found" with "Keys created in this project will show up here.", and the table shows its error state if the key request fails.

Allowed Models (scoped to selected team's models) stays disabled until a team is chosen. The create and save buttons are disabled while the request runs.

Differences by role and license​

WhoWhat they get
Admin (proxy_admin)Sees every project, can create projects in any team, edit any project and delete projects that have no keys.
Admin Viewer (proxy_admin_viewer)Sees every project. Create, edit and delete buttons are hidden because the session is view only, and the backend refuses writes from anyone but a proxy admin or a permitted team admin.
Org AdminSees the projects of their own teams and of every team in an organization they administer. Cannot create or edit unless they are also an admin of the project's team with the projects permission.
Team admin (Internal User who is an admin of a team)Sees the projects of their own teams. Can create and edit projects in teams they administer only when Create and update projects is turned on in the team admin permissions on the UI Settings tab of Admin Settings (team_admin_editable_team_fields contains projects). The backend enforces the same rule.
Internal User or Internal Viewer who is not a team adminNo nav item. The backend returns only the projects of the user's own teams if they open the URL.

Creating, editing and deleting projects needs a Spanway Enterprise license, and the gateway answers "Projects are an enterprise feature" without one. Guardrails on a project also need the guardrails license feature. Listing and viewing projects work without a license.

Errors​

What you seeWhat it meansFix
The page is missingProjects are turned off in the UI settings.Turn on [BETA] Enable Projects (page will refresh) in Admin Settings, UI Settings.
No Create Project buttonYour role may not manage projects in that team.Ask a proxy admin, or turn on project management for team admins.
"Failed to create project" with a reasonThe gateway refused the project, for example a model outside the team.Fix what the message names.
project_model_access_denied on requestsThe key's project does not allow that model.Add the model to the project.
Requests fail with Project=<id> is blockedBlock Project is on.Turn it off in Edit Project, Advanced Settings.
Requests fail with Budget has been exceeded! Project=<id> ...The project spent its Max Budget (USD).Raise the budget or wait for it to reset.

The gateway's full list of project errors, with each status and message, is on the Projects reference.

Logs​

Every project call the gateway refuses is written to the gateway log at ERROR level as Exception: <message> with a stack trace, so a normal "not allowed" or "over the team budget" refusal also appears as an error. Nothing needs doing when the toast showed the reason you expected. See the log reference.

See User management hierarchy for how projects sit between teams and keys, Access control for the team admin projects permission, the Teams page for team settings, and the Virtual Keys page for assigning keys to a project.