For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Trust CenterStatusSupportGet a demoPlatform
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingGuidesChangelog
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingGuidesChangelog
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
    • Data Models
    • API Conventions
  • Data Models
      • GETList Projects
      • POSTCreate Project
      • GETRetrieve Project
      • PUTUpdate Project
      • DELDelete Project
        • GETList Project API Keys
        • GETGet Project API Key
        • POSTCreate Project API Key
        • PUTUpdate Project API Key
        • DELRevoke Project API Key
  • Evals
  • Legacy
LogoLogo
Trust CenterStatusSupportGet a demoPlatform
Data ModelsProjectsAPI Keys

Create Project API Key

POST
https://api.confident-ai.com/v1/projects/:projectId/api-keys
POST
/v1/projects/:projectId/api-keys
$curl -X POST https://api.confident-ai.com/v1/projects/projectId/api-keys \
> -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Production agent key"
>}'
200Successful
1{
2 "success": true,
3 "data": {
4 "apiKey": {
5 "id": 34,
6 "valid": true,
7 "value": "confident_proj_9b8a7c6d5e4f3a2b1c0d9e8f7a6b5c4d",
8 "created_at": "2024-12-04T23:00:00.000Z",
9 "name": "Production agent key",
10 "lastUsed": null
11 }
12 }
13}

Mints a new project-scoped API key. The raw value is returned exactly once in this response and can never be retrieved again — store it securely. This is the key your application uses to send traces and run evaluations against the project.

Was this page helpful?
Previous

Update Project API Key

Next
Built with

Path parameters

projectIdstringRequired
The unique identifier of the project.

Headers

CONFIDENT_API_KEYstringRequired
The organization API key for your Confident AI organization.

Request

This endpoint expects an object.
namestringRequired

Human-readable label for the API key

Response

successboolean
Indicates if the request was successful
dataobject