---
title: "Create a Model API Key"
method: POST
path: "/v2/gen-ai/models/api_keys"
tags: ["DigitalOcean-public.v2-new_GradientAI Platform"]
---

# Create a Model API Key

`POST /v2/gen-ai/models/api_keys`

To create a model API key, send a POST request to `/v2/gen-ai/models/api_keys`.

## Request body

- ApiCreateModelAPIKeyInputPublic
  - `name` string — A human friendly name to identify the key

## Response `200`

A successful response.

- ApiCreateModelAPIKeyOutput
  - `api_key_info` ApiModelAPIKeyInfo — Model API Key Info
    - `created_at` string, date-time — Creation date
    - `created_by` string, uint64 — Created by
    - `deleted_at` string, date-time — Deleted date
    - `name` string — Name
    - `secret_key` string
    - `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/versions/cb3bf9b21459/schema)
