Skip to navigation

Create project

Create a new project

Authentication

AuthorizationBearer

Bearer authentication using API key. Generate an API key from the AI Guardrails Dashboard. Example: Bearer sk_123…

Keys carry one of two access scopes, chosen when the key is created:

  • Read and write — may call every endpoint. This is the default, and the scope of every key created before scopes were introduced.
  • Read only — may call read endpoints such as /v1-beta/logs, /v1-beta/analytics and the GET endpoints. Write endpoints return 403.

Issue a read-only key to anything that only needs to retrieve data, such as a log-shipping job or a dashboard, so that it cannot modify your policies or projects.

Request

This endpoint expects an object.
namestringRequired
A descriptive name for the project
policy_idstringOptional
ID of the policy to be applied to this project. If not provided, uses default policy.
project_metadatamap from strings to stringsOptional
Custom metadata tags for analysis and cross referencing
actionenumOptional

Controls whether Guard enforces flagging on this project. enforce (the default) means full enforcement: the top-level flagged in a guard response is true whenever any of the enabled detectors triggers. detect surfaces detections in the breakdown but forces the top-level flagged to false, letting you observe detector behavior without blocking traffic. Always returned when reading a project. Optional when creating — defaults to enforce. Optional when updating — omit to keep the existing value. More information in Project Mode.

Allowed values:

Response

Project created
namestring
A descriptive name for the project
policy_idstringOptional
ID of the policy to be applied to this project. If not provided, uses default policy.
project_metadatamap from strings to stringsOptional
Custom metadata tags for analysis and cross referencing
actionenumOptional

Controls whether Guard enforces flagging on this project. enforce (the default) means full enforcement: the top-level flagged in a guard response is true whenever any of the enabled detectors triggers. detect surfaces detections in the breakdown but forces the top-level flagged to false, letting you observe detector behavior without blocking traffic. Always returned when reading a project. Optional when creating — defaults to enforce. Optional when updating — omit to keep the existing value. More information in Project Mode.

Allowed values: