Anthropic · Schema
ApiKey
LLMAnthropicArtificial IntelligenceClaudeFoundation ModelsMachine LearningMCPAgents
Properties
| Name | Type | Description |
|---|---|---|
| created_at | string | RFC 3339 datetime string indicating when the API Key was created. |
| created_by | object | The ID and type of the actor that created the API key, or `null` when the creator is not recorded (legacy, workload-identity-federated, or system-created keys). |
| expires_at | object | RFC 3339 datetime string indicating when the API Key expires, or `null` if it never expires. |
| id | string | ID of the API key. |
| name | string | Name of the API key. |
| partial_key_hint | object | Partially redacted hint for the API key. |
| principal | object | The principal the API key acts as (a User or a Service Account), or `null` if the API key is not bound to a principal. |
| scope | object | Where the API key belongs: its Workspace (`{"type": "workspace", "workspace_id": "wrkspc_..."}`, with the Workspace's real ID even when it is the organization's default Workspace), or the organization |
| status | string | Status of the API key. |
| type | string | Object type. For API Keys, this is always `"api_key"`. |
| workspace_id | object | Deprecated: use `scope` instead. ID of the Workspace associated with the API key, or `null` if the API key belongs to the default Workspace. Also `null` for a principal-bound API key that has no Works |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/anthropic/main/json-schema/anthropic-beta-api-key-schema.json",
"title": "ApiKey",
"x-generated": "2026-09-23",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/anthropic-organizations-api-openapi.yml#/components/schemas/BetaApiKey",
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At",
"description": "RFC 3339 datetime string indicating when the API Key was created."
},
"created_by": {
"anyOf": [
{
"$ref": "#/$defs/BetaCreatedBy"
},
{
"type": "null"
}
],
"description": "The ID and type of the actor that created the API key, or `null` when the\ncreator is not recorded (legacy, workload-identity-federated, or\nsystem-created keys)."
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Expires At",
"description": "RFC 3339 datetime string indicating when the API Key expires, or `null` if it never expires."
},
"id": {
"type": "string",
"title": "Id",
"description": "ID of the API key."
},
"name": {
"type": "string",
"title": "Name",
"description": "Name of the API key."
},
"partial_key_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Partial Key Hint",
"description": "Partially redacted hint for the API key."
},
"principal": {
"anyOf": [
{
"oneOf": [
{
"$ref": "#/$defs/BetaApiKeyUserActor"
},
{
"$ref": "#/$defs/BetaApiKeyServiceAccountActor"
}
]
},
{
"type": "null"
}
],
"title": "Principal",
"description": "The principal the API key acts as (a User or a Service Account), or `null` if the API key is not bound to a principal."
},
"scope": {
"oneOf": [
{
"$ref": "#/$defs/BetaApiKeyOrganizationScope"
},
{
"$ref": "#/$defs/BetaApiKeyWorkspaceScope"
}
],
"title": "Scope",
"description": "Where the API key belongs: its Workspace (`{\"type\": \"workspace\", \"workspace_id\": \"wrkspc_...\"}`, with the Workspace's real ID even when it is the organization's default Workspace), or the organization (`{\"type\": \"organization\"}`) for a principal-bound API key that has no Workspace."
},
"status": {
"type": "string",
"enum": [
"active",
"archived",
"expired",
"inactive"
],
"title": "Status",
"description": "Status of the API key."
},
"type": {
"type": "string",
"const": "api_key",
"title": "Type",
"description": "Object type.\n\nFor API Keys, this is always `\"api_key\"`.",
"default": "api_key"
},
"workspace_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Workspace Id",
"description": "Deprecated: use `scope` instead. ID of the Workspace associated with the API key, or `null` if the API key belongs to the default Workspace. Also `null` for a principal-bound API key that has no Workspace; `scope` tells the two apart.",
"deprecated": true,
"x-stainless-deprecation-message": "Use `scope` instead. `workspace_id` is `null` both for an API key in the default Workspace and for a principal-bound API key that has no Workspace."
}
},
"type": "object",
"required": [
"created_at",
"created_by",
"expires_at",
"id",
"name",
"partial_key_hint",
"principal",
"scope",
"status",
"type",
"workspace_id"
],
"$defs": {
"BetaApiKeyOrganizationScope": {
"properties": {
"type": {
"type": "string",
"const": "organization",
"title": "Type",
"description": "Scope type. Always `\"organization\"`: the API key has no Workspace. Only a principal-bound API key can have this scope.",
"default": "organization"
}
},
"type": "object",
"required": [
"type"
],
"title": "ApiKeyOrganizationScope"
},
"BetaApiKeyServiceAccountActor": {
"properties": {
"service_account_id": {
"type": "string",
"title": "Service Account Id",
"description": "ID of the Service Account the API key acts as."
},
"type": {
"type": "string",
"const": "service_account_actor",
"title": "Type",
"description": "Principal type. Always `\"service_account_actor\"` for a Service Account.",
"default": "service_account_actor"
}
},
"type": "object",
"required": [
"service_account_id",
"type"
],
"title": "ApiKeyServiceAccountActor"
},
"BetaApiKeyUserActor": {
"properties": {
"type": {
"type": "string",
"const": "user_actor",
"title": "Type",
"description": "Principal type. Always `\"user_actor\"` for a User.",
"default": "user_actor"
},
"user_id": {
"type": "string",
"title": "User Id",
"description": "ID of the User the API key acts as."
}
},
"type": "object",
"required": [
"type",
"user_id"
],
"title": "ApiKeyUserActor"
},
"BetaApiKeyWorkspaceScope": {
"properties": {
"type": {
"type": "string",
"const": "workspace",
"title": "Type",
"description": "Scope type. Always `\"workspace\"`: the API key belongs to one Workspace.",
"default": "workspace"
},
"workspace_id": {
"type": "string",
"title": "Workspace Id",
"description": "ID of the Workspace the API key belongs to. Unlike the deprecated top-level `workspace_id`, this is the Workspace's real ID even for the organization's default Workspace."
}
},
"type": "object",
"required": [
"type",
"workspace_id"
],
"title": "ApiKeyWorkspaceScope"
},
"BetaCreatedBy": {
"properties": {
"id": {
"type": "string",
"title": "Id",
"description": "ID of the actor that created the object."
},
"type": {
"type": "string",
"enum": [
"service_account",
"user"
],
"title": "Type",
"description": "Type of the actor that created the object."
}
},
"type": "object",
"required": [
"id",
"type"
],
"title": "CreatedBy"
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/anthropic-beta-api-key"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.