---
title: "Create AI Gateway key"
method: POST
path: "/api/v2/ai-gateway/keys"
tags: ["Enterprise"]
---

# Create AI Gateway key

`POST /api/v2/ai-gateway/keys`

## Request body

- CodersdkCreateAIGatewayKeyRequest
  - `name` string, required

## Response `201`

Created

- CodersdkCreateAIGatewayKeyResponse
  - `created_at` string, date-time
  - `id` string, uuid
  - `key` string
  - `key_prefix` string
  - `name` string

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/versions/56b6e9f08540/schema)
