Project
Every Project method in the Confident AI Python and TypeScript SDKs.
Overview
The Confident AI SDK exposes every Project method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.
Project
client.project() returns a Project object that stands for one project. This object stores the fields listed below, and passes the project's id to every method called on it, so you don't need to pass the id nor the stored fields as arguments.
from confident_ai import ConfidentAI
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")Properties
These are the fields a Project stores. A method that loads the project fills them in, and a method that saves it sends whichever of them you have set, so set them before you save and read them after you load.
| Parameter | Type | Description |
|---|---|---|
project_id | Optional[str] | The id of the project. It must belong to the organization your API key is scoped to. |
id | Optional[str] | The id of the project, generated by Confident AI. |
name | Optional[str] | The name of the project, unique within the organization. |
description | Optional[str] | What the project covers, or null when it has no description. |
organization_id | Optional[str] | The id of the organization the project belongs to. |
created_at | Optional[str] | When the project was created. |
governance_policy | Optional[ProjectGovernancePolicy] | The governance policy the project is enrolled in, or null when it is not enrolled. See ProjectGovernancePolicy. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");Properties
These are the fields a Project stores. A method that loads the project fills them in, and a method that saves it sends whichever of them you have set, so set them before you save and read them after you load.
| Parameter | Type | Description |
|---|---|---|
projectId | string | The id of the project. It must belong to the organization your API key is scoped to. |
id | string | The id of the project, generated by Confident AI. |
name | string | The name of the project, unique within the organization. |
description | string | null | What the project covers, or null when it has no description. |
organizationId | string | The id of the organization the project belongs to. |
created_at | unknown | When the project was created. |
governancePolicy | ProjectGovernancePolicy | null | The governance policy the project is enrolled in, or null when it is not enrolled. See ProjectGovernancePolicy. |
Methods
Delete Project
Permanently deletes a project. This cannot be undone, and it cascades to everything held under it: API keys (including one an SDK may be configured with), members and role assignments, invitations, datasets, prompts, metrics, test runs, dashboards, annotation queues, red teaming frameworks, policies, alerts and export schedules. Ingested traces and spans stop being reachable. There is no confirmation step, so the safe way to retire a project is to deactivate its API keys first. Its name becomes available for reuse.
from confident_ai import ConfidentAI
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.delete()For async mode, call a_delete and await it as shown below:
result = await project.a_delete(...)import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.delete();Returns
This method returns an object of type ProjectRef.
List Permissions
Lists every project permission a project policy can grant. Each is named resource:action — dataset:read, golden:create — and its id is what you send in a policy's permissionIds. This is Confident AI's whole project catalog, not only the permissions this project already uses, and it is the same catalog for every project in your organization. Organization permissions are a separate catalog with its own endpoint.
from confident_ai import ConfidentAI
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.list_permissions()For async mode, call a_list_permissions and await it as shown below:
result = await project.a_list_permissions(...)import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.listPermissions();Returns
This method returns an object of type PermissionList.
Update Model Credentials
Sets, replaces, or clears a project's stored credential for a single model provider. While the project is still inheriting your organization's credentials, the first write creates a standalone set for the project and severs that inheritance — so the project then holds only the provider you just sent, and any other provider it relied on has to be set again here. This is a write-only surface: there is no read endpoint, and the response returns every credential masked. A provider your organization's model provider policy does not allow cannot have a credential set (403), though clearing one is always permitted.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.update_model_credentials(
provider=ModelProvider.OPEN_AI,
api_key="sk-proj-a1B2c3D4e5F6g7H8i9J0kLmN",
model_config={
"azureApiBase": "https://acme.openai.azure.com",
"azureDeploymentName": "gpt-4o",
"azureApiVersion": "2024-06-01",
"azureApiKey": "b7f3c9d1e5a24f8090c6d4b2a1e8f37c"
},
)For async mode, call a_update_model_credentials and await it as shown below:
result = await project.a_update_model_credentials(...)Parameters
| Parameter | Type | Description |
|---|---|---|
provider | ModelProvider | Required. See ModelProvider. |
api_key | Optional[str] | The provider's API key, for the API-key providers only. Send the raw secret to set it, or null to clear it; a masked value read back from a response is rejected. Sending it for a configuration provider is rejected. |
model_config | Optional[Dict[str, Any]] | The provider's configuration, for the configuration providers only — for example azureApiBase, azureDeploymentName, azureApiVersion and azureApiKey for AZURE. It replaces the stored configuration wholesale rather than merging into it, so send every key the provider needs; send null to clear it. It must not be empty and must not carry masked values read back from a response. Sending it for an API-key provider is rejected. For BEDROCK, always send regionName and modelId, then authenticate with either ACCESS_KEYS (awsAccessKeyId and awsSecretAccessKey) or, when calling the OpenAI-compatible Mantle API by setting api to MANTLE, an authType of API_KEY together with apiKey, an optional apiBase, and an optional projectId (sent as the OpenAI- Project header so AWS attributes usage and cost to that Mantle project; letters, numbers, hyphens and underscores only). An API key only works with the Mantle API, and assume-role Bedrock configurations can only be managed on the Confident AI platform. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.updateModelCredentials(
ModelProvider.OPEN_AI,
{
apiKey: "sk-proj-a1B2c3D4e5F6g7H8i9J0kLmN",
modelConfig: {
azureApiBase: "https://acme.openai.azure.com",
azureDeploymentName: "gpt-4o",
azureApiVersion: "2024-06-01",
azureApiKey: "b7f3c9d1e5a24f8090c6d4b2a1e8f37c"
}
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
provider | ModelProvider | Required. See ModelProvider. |
apiKey | string | null | The provider's API key, for the API-key providers only. Send the raw secret to set it, or null to clear it; a masked value read back from a response is rejected. Sending it for a configuration provider is rejected. |
modelConfig | Record<string, unknown> | null | The provider's configuration, for the configuration providers only — for example azureApiBase, azureDeploymentName, azureApiVersion and azureApiKey for AZURE. It replaces the stored configuration wholesale rather than merging into it, so send every key the provider needs; send null to clear it. It must not be empty and must not carry masked values read back from a response. Sending it for an API-key provider is rejected. For BEDROCK, always send regionName and modelId, then authenticate with either ACCESS_KEYS (awsAccessKeyId and awsSecretAccessKey) or, when calling the OpenAI-compatible Mantle API by setting api to MANTLE, an authType of API_KEY together with apiKey, an optional apiBase, and an optional projectId (sent as the OpenAI- Project header so AWS attributes usage and cost to that Mantle project; letters, numbers, hyphens and underscores only). An API key only works with the Mantle API, and assume-role Bedrock configurations can only be managed on the Confident AI platform. |
Returns
This method returns an object of type ModelCredentials.
Get Project
Retrieves a single project by id, including the governance policy it is enrolled in. A project in another organization is reported as not found rather than as forbidden.
from confident_ai import ConfidentAI
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.get()For async mode, call a_get and await it as shown below:
result = await project.a_get(...)import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.get();Returns
This method returns an object of type Project.
Update Project
Renames a project or changes its description, and returns the project as stored. Send at least one field; a field you omit is left as it is.
from confident_ai import ConfidentAI
client = ConfidentAI()
project = client.project(project_id="<PROJECT-ID>")
result = project.update()For async mode, call a_update and await it as shown below:
result = await project.a_update(...)import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const project = client.project("<PROJECT-ID>");
const result = await project.update();Returns
This method returns an object of type Project.
Methods (Stateless)
These methods take every argument themselves, so a caller reaches them through client.projects without opening a Project first.
List Projects
Lists every project in your organization, ordered by name. Each project is returned in full, including the governance policy it is enrolled in, so a caller building a project picker does not need a second call per row.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.list()For async mode, call a_list and await it as shown below:
result = await client.projects.a_list(...)import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.list();Returns
This method returns an object of type ProjectList.
Create Project
Creates a project in your organization and provisions a project-scoped API key for it. The key's full value is returned once, in this response, and is redacted on every later read — so capture it here. The project is seeded with Confident AI's default classifiers, online metric and trace alert. How many projects you may hold depends on your plan, so this can be refused on entitlement grounds even when the name is free.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.create(
name="Customer Support Agent",
description="The support chatbot serving acme.com.",
email="jane@acme.com",
)For async mode, call a_create and await it as shown below:
result = await client.projects.a_create(...)Parameters
| Parameter | Type | Description |
|---|---|---|
name | str | Required. The name of the project, which must not already be taken by another project in the organization. |
description | Optional[str] | What the project covers. Omit it to leave it unset. |
email | Optional[str] | The email of an existing member of your organization to assign as the project's Owner, which also attributes the provisioned API key to them. Omit it and the project has no |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.create(
"Customer Support Agent",
{
description: "The support chatbot serving acme.com.",
email: "jane@acme.com"
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Required. The name of the project, which must not already be taken by another project in the organization. |
description | string | What the project covers. Omit it to leave it unset. |
email | string | The email of an existing member of your organization to assign as the project's Owner, which also attributes the provisioned API key to them. Omit it and the project has no |
Returns
This method returns an object of type CreateProjectResult.
Get Project
Retrieves a single project by id, including the governance policy it is enrolled in. A project in another organization is reported as not found rather than as forbidden.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.get(project_id="<PROJECT-ID>")For async mode, call a_get and await it as shown below:
result = await client.projects.a_get(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project. It must belong to the organization your API key is scoped to. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.get("<PROJECT-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project. It must belong to the organization your API key is scoped to. |
Returns
This method returns an object of type Project.
Update Project
Renames a project or changes its description, and returns the project as stored. Send at least one field; a field you omit is left as it is.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.update(
project_id="<PROJECT-ID>",
name="Customer Support Agent",
description="The support chatbot serving acme.com.",
)For async mode, call a_update and await it as shown below:
result = await client.projects.a_update(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project. It must belong to the organization your API key is scoped to. |
name | Optional[str] | The name of the project, which must not already be taken by another project in the organization. |
description | Optional[str] | What the project covers. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.update(
"<PROJECT-ID>",
{
name: "Customer Support Agent",
description: "The support chatbot serving acme.com."
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project. It must belong to the organization your API key is scoped to. |
name | string | The name of the project, which must not already be taken by another project in the organization. |
description | string | What the project covers. |
Returns
This method returns an object of type Project.
Delete Project
Permanently deletes a project. This cannot be undone, and it cascades to everything held under it: API keys (including one an SDK may be configured with), members and role assignments, invitations, datasets, prompts, metrics, test runs, dashboards, annotation queues, red teaming frameworks, policies, alerts and export schedules. Ingested traces and spans stop being reachable. There is no confirmation step, so the safe way to retire a project is to deactivate its API keys first. Its name becomes available for reuse.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.delete(project_id="<PROJECT-ID>")For async mode, call a_delete and await it as shown below:
result = await client.projects.a_delete(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project. It must belong to the organization your API key is scoped to. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.delete("<PROJECT-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project. It must belong to the organization your API key is scoped to. |
Returns
This method returns an object of type ProjectRef.
Update Model Credentials
Sets, replaces, or clears a project's stored credential for a single model provider. While the project is still inheriting your organization's credentials, the first write creates a standalone set for the project and severs that inheritance — so the project then holds only the provider you just sent, and any other provider it relied on has to be set again here. This is a write-only surface: there is no read endpoint, and the response returns every credential masked. A provider your organization's model provider policy does not allow cannot have a credential set (403), though clearing one is always permitted.
from confident_ai import ConfidentAI
from confident_ai.common import ModelProvider
client = ConfidentAI()
result = client.projects.update_model_credentials(
project_id="<PROJECT-ID>",
provider=ModelProvider.OPEN_AI,
api_key="sk-proj-a1B2c3D4e5F6g7H8i9J0kLmN",
model_config={
"azureApiBase": "https://acme.openai.azure.com",
"azureDeploymentName": "gpt-4o",
"azureApiVersion": "2024-06-01",
"azureApiKey": "b7f3c9d1e5a24f8090c6d4b2a1e8f37c"
},
)For async mode, call a_update_model_credentials and await it as shown below:
result = await client.projects.a_update_model_credentials(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project, which must belong to the organization your API key is scoped to. |
provider | ModelProvider | Required. See ModelProvider. |
api_key | Optional[str] | The provider's API key, for the API-key providers only. Send the raw secret to set it, or null to clear it; a masked value read back from a response is rejected. Sending it for a configuration provider is rejected. |
model_config | Optional[Dict[str, Any]] | The provider's configuration, for the configuration providers only — for example azureApiBase, azureDeploymentName, azureApiVersion and azureApiKey for AZURE. It replaces the stored configuration wholesale rather than merging into it, so send every key the provider needs; send null to clear it. It must not be empty and must not carry masked values read back from a response. Sending it for an API-key provider is rejected. For BEDROCK, always send regionName and modelId, then authenticate with either ACCESS_KEYS (awsAccessKeyId and awsSecretAccessKey) or, when calling the OpenAI-compatible Mantle API by setting api to MANTLE, an authType of API_KEY together with apiKey, an optional apiBase, and an optional projectId (sent as the OpenAI- Project header so AWS attributes usage and cost to that Mantle project; letters, numbers, hyphens and underscores only). An API key only works with the Mantle API, and assume-role Bedrock configurations can only be managed on the Confident AI platform. |
import { ConfidentAI } from "confident-ai";
import { ModelProvider } from "confident-ai/common";
const client = new ConfidentAI();
const result = await client.projects.updateModelCredentials(
"<PROJECT-ID>",
ModelProvider.OPEN_AI,
{
apiKey: "sk-proj-a1B2c3D4e5F6g7H8i9J0kLmN",
modelConfig: {
azureApiBase: "https://acme.openai.azure.com",
azureDeploymentName: "gpt-4o",
azureApiVersion: "2024-06-01",
azureApiKey: "b7f3c9d1e5a24f8090c6d4b2a1e8f37c"
}
},
);Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project, which must belong to the organization your API key is scoped to. |
provider | ModelProvider | Required. See ModelProvider. |
apiKey | string | null | The provider's API key, for the API-key providers only. Send the raw secret to set it, or null to clear it; a masked value read back from a response is rejected. Sending it for a configuration provider is rejected. |
modelConfig | Record<string, unknown> | null | The provider's configuration, for the configuration providers only — for example azureApiBase, azureDeploymentName, azureApiVersion and azureApiKey for AZURE. It replaces the stored configuration wholesale rather than merging into it, so send every key the provider needs; send null to clear it. It must not be empty and must not carry masked values read back from a response. Sending it for an API-key provider is rejected. For BEDROCK, always send regionName and modelId, then authenticate with either ACCESS_KEYS (awsAccessKeyId and awsSecretAccessKey) or, when calling the OpenAI-compatible Mantle API by setting api to MANTLE, an authType of API_KEY together with apiKey, an optional apiBase, and an optional projectId (sent as the OpenAI- Project header so AWS attributes usage and cost to that Mantle project; letters, numbers, hyphens and underscores only). An API key only works with the Mantle API, and assume-role Bedrock configurations can only be managed on the Confident AI platform. |
Returns
This method returns an object of type ModelCredentials.
List Permissions
Lists every project permission a project policy can grant. Each is named resource:action — dataset:read, golden:create — and its id is what you send in a policy's permissionIds. This is Confident AI's whole project catalog, not only the permissions this project already uses, and it is the same catalog for every project in your organization. Organization permissions are a separate catalog with its own endpoint.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.projects.list_permissions(project_id="<PROJECT-ID>")For async mode, call a_list_permissions and await it as shown below:
result = await client.projects.a_list_permissions(...)Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | str | Required. The id of the project, which must belong to the organization your API key is scoped to. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.projects.listPermissions("<PROJECT-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | Required. The id of the project, which must belong to the organization your API key is scoped to. |
Returns
This method returns an object of type PermissionList.
Types
CreateProjectResult
The created project and the API key provisioned with it. The key's value is not retrievable afterwards, so read it out of this response.
class CreateProjectResult:
project: ProjectSummary
api_key: Optional[ProjectDefaultApiKey] = Field(alias="apiKey")projectProjectSummaryRequired
See ProjectSummary.
api_keyOptional[ProjectDefaultApiKey]Required
The project-scoped API key provisioned with the project, carrying its full value for the only time. Null only if no key was provisioned.
See ProjectDefaultApiKey.
interface CreateProjectResult {
project: ProjectSummary;
apiKey: ProjectDefaultApiKey | null;
}projectProjectSummaryRequired
See ProjectSummary.
apiKeyProjectDefaultApiKey | nullRequired
The project-scoped API key provisioned with the project, carrying its full value for the only time. Null only if no key was provisioned.
See ProjectDefaultApiKey.
ModelCredentials
One provider credential per field, for the whole organization or for a single project. Every secret comes back masked — fifteen asterisks followed by its last six characters, and the same treatment for the secret leaves inside a configuration object — so a stored credential can never be read back in full once it is set. A field is null when no credential is stored for that provider.
class ModelCredentials:
id: str
open_ai_api_key: Optional[str] = Field(alias="openAiApiKey")
anthropic_api_key: Optional[str] = Field(alias="anthropicApiKey")
gemini_api_key: Optional[str] = Field(alias="geminiApiKey")
x_ai_api_key: Optional[str] = Field(alias="xAiApiKey")
deep_seek_api_key: Optional[str] = Field(alias="deepSeekApiKey")
mistral_api_key: Optional[str] = Field(alias="mistralApiKey")
perplexity_api_key: Optional[str] = Field(alias="perplexityApiKey")
type_safe_api_key: Optional[str] = Field(alias="typeSafeApiKey")
fal_api_key: Optional[str] = Field(alias="falApiKey")
bedrock_model_config: Optional[Dict[str, Any]] = Field(alias="bedrockModelConfig")
vertex_ai_model_config: Optional[Dict[str, Any]] = Field(alias="vertexAiModelConfig")
azure_model_config: Optional[Dict[str, Any]] = Field(alias="azureModelConfig")
port_key_config: Optional[Dict[str, Any]] = Field(alias="portKeyConfig")
open_router_config: Optional[Dict[str, Any]] = Field(alias="openRouterConfig")
true_foundry_config: Optional[Dict[str, Any]] = Field(alias="trueFoundryConfig")
lite_llm_config: Optional[Dict[str, Any]] = Field(alias="liteLlmConfig")
hugging_face_config: Optional[Dict[str, Any]] = Field(alias="huggingFaceConfig")
organization_id: Optional[str] = Field(alias="organizationId")idstrRequired
The id of the credentials record, generated by Confident AI. A project that inherits the organization's credentials shares this id with it.
Example: "<MODEL-CREDENTIALS-ID>"
open_ai_api_keyOptional[str]Required
The stored OpenAI API key, masked, or null when none is stored.
Example: "***************Yz7Kq2"
anthropic_api_keyOptional[str]Required
The stored Anthropic API key, masked, or null when none is stored.
gemini_api_keyOptional[str]Required
The stored Gemini API key, masked, or null when none is stored.
x_ai_api_keyOptional[str]Required
The stored xAI API key, masked, or null when none is stored.
deep_seek_api_keyOptional[str]Required
The stored DeepSeek API key, masked, or null when none is stored.
mistral_api_keyOptional[str]Required
The stored Mistral API key, masked, or null when none is stored.
perplexity_api_keyOptional[str]Required
The stored Perplexity API key, masked, or null when none is stored.
type_safe_api_keyOptional[str]Required
The stored TypeSafe API key, masked, or null when none is stored.
fal_api_keyOptional[str]Required
The stored fal API key, masked, or null when none is stored. It powers the speech-to-speech simulated caller.
bedrock_model_configOptional[Dict[str, Any]]Required
The stored Amazon Bedrock configuration — access keys, an assumed IAM role, or a Mantle API key — with its secret fields masked, or null when none is stored.
vertex_ai_model_configOptional[Dict[str, Any]]Required
The stored Vertex AI configuration, with its secret fields masked, or null when none is stored.
azure_model_configOptional[Dict[str, Any]]Required
The stored Azure OpenAI configuration, with its secret fields masked, or null when none is stored.
Example: {"azureApiBase":"https://acme.openai.azure.com","azureDeploymentName":"gpt-4o","azureApiVersion":"2024-06-01","azureApiKey":"***************Yz7Kq2"}
port_key_configOptional[Dict[str, Any]]Required
The stored Portkey configuration, with its secret fields masked, or null when none is stored.
open_router_configOptional[Dict[str, Any]]Required
The stored OpenRouter configuration, with its secret fields masked, or null when none is stored.
true_foundry_configOptional[Dict[str, Any]]Required
The stored TrueFoundry configuration, with its secret fields masked, or null when none is stored.
lite_llm_configOptional[Dict[str, Any]]Required
The stored LiteLLM configuration, with its secret fields masked, or null when none is stored.
hugging_face_configOptional[Dict[str, Any]]Required
The stored Hugging Face configuration, with its secret fields masked, or null when none is stored.
organization_idOptional[str]Required
The id of the organization these credentials belong to, or null when they belong to a single project.
Example: "<ORGANIZATION-ID>"
interface ModelCredentials {
id: string;
openAiApiKey: string | null;
anthropicApiKey: string | null;
geminiApiKey: string | null;
xAiApiKey: string | null;
deepSeekApiKey: string | null;
mistralApiKey: string | null;
perplexityApiKey: string | null;
typeSafeApiKey: string | null;
falApiKey: string | null;
bedrockModelConfig: Record<string, unknown> | null;
vertexAiModelConfig: Record<string, unknown> | null;
azureModelConfig: Record<string, unknown> | null;
portKeyConfig: Record<string, unknown> | null;
openRouterConfig: Record<string, unknown> | null;
trueFoundryConfig: Record<string, unknown> | null;
liteLlmConfig: Record<string, unknown> | null;
huggingFaceConfig: Record<string, unknown> | null;
organizationId: string | null;
}idstringRequired
The id of the credentials record, generated by Confident AI. A project that inherits the organization's credentials shares this id with it.
Example: "<MODEL-CREDENTIALS-ID>"
openAiApiKeystring | nullRequired
The stored OpenAI API key, masked, or null when none is stored.
Example: "***************Yz7Kq2"
anthropicApiKeystring | nullRequired
The stored Anthropic API key, masked, or null when none is stored.
geminiApiKeystring | nullRequired
The stored Gemini API key, masked, or null when none is stored.
xAiApiKeystring | nullRequired
The stored xAI API key, masked, or null when none is stored.
deepSeekApiKeystring | nullRequired
The stored DeepSeek API key, masked, or null when none is stored.
mistralApiKeystring | nullRequired
The stored Mistral API key, masked, or null when none is stored.
perplexityApiKeystring | nullRequired
The stored Perplexity API key, masked, or null when none is stored.
typeSafeApiKeystring | nullRequired
The stored TypeSafe API key, masked, or null when none is stored.
falApiKeystring | nullRequired
The stored fal API key, masked, or null when none is stored. It powers the speech-to-speech simulated caller.
bedrockModelConfigRecord<string, unknown> | nullRequired
The stored Amazon Bedrock configuration — access keys, an assumed IAM role, or a Mantle API key — with its secret fields masked, or null when none is stored.
vertexAiModelConfigRecord<string, unknown> | nullRequired
The stored Vertex AI configuration, with its secret fields masked, or null when none is stored.
azureModelConfigRecord<string, unknown> | nullRequired
The stored Azure OpenAI configuration, with its secret fields masked, or null when none is stored.
Example: {"azureApiBase":"https://acme.openai.azure.com","azureDeploymentName":"gpt-4o","azureApiVersion":"2024-06-01","azureApiKey":"***************Yz7Kq2"}
portKeyConfigRecord<string, unknown> | nullRequired
The stored Portkey configuration, with its secret fields masked, or null when none is stored.
openRouterConfigRecord<string, unknown> | nullRequired
The stored OpenRouter configuration, with its secret fields masked, or null when none is stored.
trueFoundryConfigRecord<string, unknown> | nullRequired
The stored TrueFoundry configuration, with its secret fields masked, or null when none is stored.
liteLlmConfigRecord<string, unknown> | nullRequired
The stored LiteLLM configuration, with its secret fields masked, or null when none is stored.
huggingFaceConfigRecord<string, unknown> | nullRequired
The stored Hugging Face configuration, with its secret fields masked, or null when none is stored.
organizationIdstring | nullRequired
The id of the organization these credentials belong to, or null when they belong to a single project.
Example: "<ORGANIZATION-ID>"
ModelProvider
This is the provider of the model.
class ModelProvider(Enum):
OPEN_AI = "OPEN_AI"
CUSTOM = "CUSTOM"
CONFIDENT_AI = "CONFIDENT_AI"
BEDROCK = "BEDROCK"
ANTHROPIC = "ANTHROPIC"
GEMINI = "GEMINI"
X_AI = "X_AI"
DEEPSEEK = "DEEPSEEK"
MOONSHOT_AI = "MOONSHOT_AI"
VERTEX_AI = "VERTEX_AI"
AZURE = "AZURE"
MISTRAL = "MISTRAL"
PERPLEXITY = "PERPLEXITY"
OPEN_ROUTER = "OPEN_ROUTER"
PORTKEY = "PORTKEY"
LITE_LLM = "LITE_LLM"
TRUE_FOUNDRY = "TRUE_FOUNDRY"
HUGGING_FACE = "HUGGING_FACE"
TYPE_SAFE = "TYPE_SAFE"
FAL = "FAL"enum ModelProvider {
OPEN_AI = "OPEN_AI",
CUSTOM = "CUSTOM",
CONFIDENT_AI = "CONFIDENT_AI",
BEDROCK = "BEDROCK",
ANTHROPIC = "ANTHROPIC",
GEMINI = "GEMINI",
X_AI = "X_AI",
DEEPSEEK = "DEEPSEEK",
MOONSHOT_AI = "MOONSHOT_AI",
VERTEX_AI = "VERTEX_AI",
AZURE = "AZURE",
MISTRAL = "MISTRAL",
PERPLEXITY = "PERPLEXITY",
OPEN_ROUTER = "OPEN_ROUTER",
PORTKEY = "PORTKEY",
LITE_LLM = "LITE_LLM",
TRUE_FOUNDRY = "TRUE_FOUNDRY",
HUGGING_FACE = "HUGGING_FACE",
TYPE_SAFE = "TYPE_SAFE",
FAL = "FAL",
}OPEN_AI · CUSTOM · CONFIDENT_AI · BEDROCK · ANTHROPIC · GEMINI · X_AI · DEEPSEEK · MOONSHOT_AI · VERTEX_AI · AZURE · MISTRAL · PERPLEXITY · OPEN_ROUTER · PORTKEY · LITE_LLM · TRUE_FOUNDRY · HUGGING_FACE · TYPE_SAFE · FAL
Permission
One thing a policy can allow. Permissions are never granted to a member directly: a policy names a set of them, a role holds policies, and a member holds roles.
class Permission:
id: str
name: str
description: Optional[str]idstrRequired
The id of the permission, generated by Confident AI. This is what a policy references in its permissionIds.
Example: "<PERMISSION-ID>"
namestrRequired
The permission, written as resource:action — the resource it applies to, then what it allows on it. read grants viewing, manage grants creating and updating, and create, update and delete appear where a resource distinguishes them.
Example: "user:read"
descriptionOptional[str]Required
What the permission allows, in prose, or null when it has none. Confident AI creates these permissions from its own catalog and does not describe them, so this is null unless someone has filled it in.
interface Permission {
id: string;
name: string;
description: string | null;
}idstringRequired
The id of the permission, generated by Confident AI. This is what a policy references in its permissionIds.
Example: "<PERMISSION-ID>"
namestringRequired
The permission, written as resource:action — the resource it applies to, then what it allows on it. read grants viewing, manage grants creating and updating, and create, update and delete appear where a resource distinguishes them.
Example: "user:read"
descriptionstring | nullRequired
What the permission allows, in prose, or null when it has none. Confident AI creates these permissions from its own catalog and does not describe them, so this is null unless someone has filled it in.
PermissionList
The complete set of permissions a policy in this scope can grant, taken from Confident AI's own catalog rather than from what your organization happens to use already.
class PermissionList:
permissions: List[Permission]permissionsList[Permission]Required
Every permission in the catalog for this scope, in no particular order.
See Permission.
interface PermissionList {
permissions: Permission[];
}permissionsPermission[]Required
Every permission in the catalog for this scope, in no particular order.
See Permission.
Project
A workspace inside your organization. A project owns its own API keys, members, datasets, prompts, metrics and traces, and every project-scoped endpoint reads and writes within exactly one of them.
class Project:
id: str
name: str
description: Optional[str]
organization_id: str = Field(alias="organizationId")
created_at: str
governance_policy: Optional[ProjectGovernancePolicy] = Field(alias="governancePolicy")idstrRequired
The id of the project, generated by Confident AI.
Example: "<PROJECT-ID>"
namestrRequired
The name of the project, unique within the organization.
Example: "Customer Support Agent"
descriptionOptional[str]Required
What the project covers, or null when it has no description.
Example: "The support chatbot serving acme.com."
organization_idstrRequired
The id of the organization the project belongs to.
Example: "<ORGANIZATION-ID>"
created_atstrRequired
When the project was created.
Example: "2025-01-14T09:30:00+00:00"
governance_policyOptional[ProjectGovernancePolicy]Required
The governance policy the project is enrolled in, or null when it is not enrolled.
interface Project {
id: string;
name: string;
description: string | null;
organizationId: string;
created_at: string;
governancePolicy: ProjectGovernancePolicy | null;
}idstringRequired
The id of the project, generated by Confident AI.
Example: "<PROJECT-ID>"
namestringRequired
The name of the project, unique within the organization.
Example: "Customer Support Agent"
descriptionstring | nullRequired
What the project covers, or null when it has no description.
Example: "The support chatbot serving acme.com."
organizationIdstringRequired
The id of the organization the project belongs to.
Example: "<ORGANIZATION-ID>"
created_atstringRequired
When the project was created.
Example: "2025-01-14T09:30:00+00:00"
governancePolicyProjectGovernancePolicy | nullRequired
The governance policy the project is enrolled in, or null when it is not enrolled.
ProjectDefaultApiKey
The project-scoped API key provisioned alongside a new project, returned with its full value exactly once. This is the key an SDK config gets, and it is the credential the project's own data endpoints authenticate with — the organization key you created the project with cannot reach them.
class ProjectDefaultApiKey:
id: int
name: Optional[str]
valid: bool
value: str
shadow_value: Optional[str] = Field(alias="shadowValue")
rotates_at: Optional[str] = Field(alias="rotatesAt")
created_at: str
last_used: Optional[str] = Field(alias="lastUsed")
expires_at: Optional[str] = Field(alias="expiresAt")idintRequired
The id of the API key, generated by Confident AI. Pass it as apiKeyId when deactivating or rotating the key.
Example: 1041
nameOptional[str]Required
The label the key is listed under.
Example: "Default Key"
validboolRequired
Whether the key is active. A deactivated key is rejected on authentication.
Example: true
valuestrRequired
The full, unmasked key. This is the only response that ever carries it — every later read of this key redacts it to its last six characters — so store it now.
Example: "confident_us_proj_KZ0m8vQ2sVxT1bR4dYnJ6hLpA3wUcE9f"
shadow_valueOptional[str]Required
The replacement value while a rotation's grace period is running. Always null on a freshly provisioned key, since nothing has been rotated yet.
rotates_atOptional[str]Required
When a pending rotation completes and shadowValue replaces value, or null when no rotation is pending.
created_atstrRequired
When the key was created.
Example: "2025-01-14T09:30:00+00:00"
last_usedOptional[str]Required
When the key was last used to authenticate, or null if it has never been used.
expires_atOptional[str]Required
When the key expires, or null if it never expires. A provisioned key never expires; create your own key with expiresInDays if you want one that does.
interface ProjectDefaultApiKey {
id: number;
name: string | null;
valid: boolean;
value: string;
shadowValue: string | null;
rotatesAt: string | null;
created_at: string;
lastUsed: string | null;
expiresAt: string | null;
}idnumberRequired
The id of the API key, generated by Confident AI. Pass it as apiKeyId when deactivating or rotating the key.
Example: 1041
namestring | nullRequired
The label the key is listed under.
Example: "Default Key"
validbooleanRequired
Whether the key is active. A deactivated key is rejected on authentication.
Example: true
valuestringRequired
The full, unmasked key. This is the only response that ever carries it — every later read of this key redacts it to its last six characters — so store it now.
Example: "confident_us_proj_KZ0m8vQ2sVxT1bR4dYnJ6hLpA3wUcE9f"
shadowValuestring | nullRequired
The replacement value while a rotation's grace period is running. Always null on a freshly provisioned key, since nothing has been rotated yet.
rotatesAtstring | nullRequired
When a pending rotation completes and shadowValue replaces value, or null when no rotation is pending.
created_atstringRequired
When the key was created.
Example: "2025-01-14T09:30:00+00:00"
lastUsedstring | nullRequired
When the key was last used to authenticate, or null if it has never been used.
expiresAtstring | nullRequired
When the key expires, or null if it never expires. A provisioned key never expires; create your own key with expiresInDays if you want one that does.
ProjectGovernancePolicy
The governance policy a project is enrolled in, named rather than resolved. Retrieve the policy itself to see the controls it enforces.
class ProjectGovernancePolicy:
id: str
name: stridstrRequired
The id of the governance policy, generated by Confident AI.
Example: "<GOVERNANCE-POLICY-ID>"
namestrRequired
The name of the governance policy.
Example: "EU AI Act"
interface ProjectGovernancePolicy {
id: string;
name: string;
}idstringRequired
The id of the governance policy, generated by Confident AI.
Example: "<GOVERNANCE-POLICY-ID>"
namestringRequired
The name of the governance policy.
Example: "EU AI Act"
ProjectList
The organization's projects. The list is not paginated: every project is returned.
class ProjectList:
projects: List[Project]projectsList[Project]Required
Every project in the organization, ordered by name.
See Project.
interface ProjectList {
projects: Project[];
}projectsProject[]Required
Every project in the organization, ordered by name.
See Project.
ProjectRef
Confirmation that the project was deleted.
class ProjectRef:
id: stridstrRequired
The id of the project that was deleted.
Example: "<PROJECT-ID>"
interface ProjectRef {
id: string;
}idstringRequired
The id of the project that was deleted.
Example: "<PROJECT-ID>"
ProjectSummary
A project's own fields, without its governance enrollment. This is the shape create returns, where the project cannot yet be enrolled in a policy.
class ProjectSummary:
id: str
name: str
description: Optional[str]
organization_id: str = Field(alias="organizationId")
created_at: stridstrRequired
The id of the project, generated by Confident AI.
Example: "<PROJECT-ID>"
namestrRequired
The name of the project, unique within the organization.
Example: "Customer Support Agent"
descriptionOptional[str]Required
What the project covers, or null when it has no description.
Example: "The support chatbot serving acme.com."
organization_idstrRequired
The id of the organization the project belongs to.
Example: "<ORGANIZATION-ID>"
created_atstrRequired
When the project was created.
Example: "2025-01-14T09:30:00+00:00"
interface ProjectSummary {
id: string;
name: string;
description: string | null;
organizationId: string;
created_at: string;
}idstringRequired
The id of the project, generated by Confident AI.
Example: "<PROJECT-ID>"
namestringRequired
The name of the project, unique within the organization.
Example: "Customer Support Agent"
descriptionstring | nullRequired
What the project covers, or null when it has no description.
Example: "The support chatbot serving acme.com."
organizationIdstringRequired
The id of the organization the project belongs to.
Example: "<ORGANIZATION-ID>"
created_atstringRequired
When the project was created.
Example: "2025-01-14T09:30:00+00:00"
Last updated on