Skip to main content
Create a new API key for the user or a specific project

Tool details

FieldValue
Namecreate_api_key
GroupAPI Keys

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name for the API key"
    },
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug (optional for user-level key)"
    },
    "expires_at": {
      "type": "string",
      "description": "Expiration date in ISO 8601 format"
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false,
  "description": "Input schema for the create_api_key tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the returned record."
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Project identifier associated with this result."
    },
    "user_id": {
      "type": "string",
      "description": "The user id associated with this tool result."
    },
    "name": {
      "type": "string",
      "description": "Human-readable name for the returned record."
    },
    "key": {
      "type": "string",
      "description": "The key associated with this tool result."
    },
    "key_prefix": {
      "type": "string",
      "description": "The key prefix associated with this tool result."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "The expires at associated with this tool result."
    },
    "created_at": {
      "type": "string",
      "description": "Creation timestamp in ISO 8601 format."
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "One scope item associated with this tool result."
      },
      "description": "List of scopes associated with this tool result."
    }
  },
  "required": [
    "id",
    "project_id",
    "user_id",
    "name",
    "key",
    "key_prefix",
    "expires_at",
    "created_at",
    "scopes"
  ],
  "additionalProperties": false,
  "description": "Structured result returned by the create_api_key tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}