---
title: "Create Anthropic API Key"
method: POST
path: "/v2/gen-ai/anthropic/keys"
tags: ["DigitalOcean-public.v2-new_GradientAI Platform"]
---

# Create Anthropic API Key

`POST /v2/gen-ai/anthropic/keys`

To create an Anthropic API key, send a POST request to `/v2/gen-ai/anthropic/keys`.

## Request body

- ApiCreateAnthropicAPIKeyInputPublic — CreateAnthropicAPIKeyInputPublic is used to create a new Anthropic API key for a specific agent.
  - `api_key` string — Anthropic API key
  - `name` string — Name of the key

## Response `200`

A successful response.

- ApiCreateAnthropicAPIKeyOutput — CreateAnthropicAPIKeyOutput is used to return the newly created Anthropic API key.
  - `api_key_info` ApiAnthropicAPIKeyInfo — Anthropic API Key Info
    - `created_at` string, date-time — Key creation date
    - `created_by` string, uint64 — Created by user id from DO
    - `deleted_at` string, date-time — Key deleted date
    - `name` string — Name
    - `updated_at` string, date-time — Key last updated date
    - `uuid` string — Uuid

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

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