---
title: "Create Api Key"
method: POST
path: "/api/v1/mcp/api-key"
tags: ["MCP API Keys"]
---

# Create Api Key

`POST /api/v1/mcp/api-key`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/mcp/api-key`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Create the user's MCP API key. Returns plaintext once.

## Response `200`

Successful Response

- McpApiKeyCreateResponse
  - `success` boolean
  - `api_key` string, required: Plaintext key — shown only once
  - `meta` McpApiKeyMeta, required
    - `id` string, required
    - `key_prefix` string, required
    - `last_four` string, required
    - `created_at` string, nullable
    - `updated_at` string, nullable
    - `last_used_at` string, nullable
  - `message` string, required

## Other responses

- `401`: Unauthorized
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/caspr/apis/casper-api.md) - [All operations](https://skmtc.dev/caspr/apis/casper-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caspr/apis/casper-api/revisions/f9765e3aa00c?raw)
