---
title: "Create Api Key"
method: POST
path: "/keys"
tags: ["Keys"]
---

# Create Api Key

`POST /keys`

Creates an API key for a user.

Args:
    request (Request): The request object containing the user ID in the request state.

Returns:
    str: The created API key.

## Response `200`

Successful Response

- string

## Changes

> 359 revisions in range; 46 could not be searched.

- **2025-06-27** `e3e84db47198` — 2 info
  - api tag `Api Keys` added
  - api tag `Keys` removed

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/keys/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/713e4f3b7519/schema)
