---
title: "Create an API key"
method: POST
path: "/api/agent/keys"
tags: ["agent"]
---

# Create an API key

`POST /api/agent/keys`

## Request

- Base URL: `https://lumify.ai`
- URL: `https://lumify.ai/api/agent/keys`
- Auth: HTTP bearer

## Request body

- object

## Response `200`

Successful Response

- AgentApiKey
  - `id` integer, nullable
  - `name` string, nullable
  - `key_prefix` string, nullable
  - `scopes` string[], nullable
  - `created_at` string, nullable
  - `last_used_at` string, nullable
  - `expires_at` string, nullable
  - `is_active` boolean, nullable
  - `key` string, nullable: Full API key — returned once on create.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/lumify/apis/lumify-sports-intelligence-api.md) · [All operations](https://skmtc.dev/lumify/apis/lumify-sports-intelligence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lumify/apis/lumify-sports-intelligence-api/revisions/f91ea41a2606?raw)
