# General Translation Platform: Create a Project API Key
URL: https://generaltranslation.com/en-US/docs/platform/openapi/reference/project/create-api-key.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Create an API key for the selected Project. Requires project:api_keys:write and delegates only Project permissions held by the request identity. API reference for Create a Project API Key.

## Endpoint

`POST https://api.gtx.dev/v2/projects/{projectId}/api-keys`

**Operation ID:** `createProjectApiKey`

**Tags:** `Project`

**Summary:** Create a Project API Key

Create a project API key. Requires `project:api_keys:write`; project keys cannot create other keys. If you cannot grant a selected permission, the request returns `403` without creating a key. Each successful request creates a new key. Store the returned secret securely.

Authentication: required. Send an API key in the `Authorization: Bearer <key>` header when authenticating.

### Parameters

- `projectId` (path, string, required)
- `gt-api-version` (header, "2025-01-01.v0" | "2025-11-03.v1" | "2026-02-18.v1" | "2026-03-06.v1", optional): API contract version. Defaults to the oldest supported version.

### Request body (required)

Body (`application/json`, object):
- `name` (string, required): Key name, 1–255 characters after trimming.
- `permissions` ("project:write" | "project:context:read" | "project:context:write" | "project:files:read" | "project:files:write" | "project:translations:generate" | "project:translations:enqueue"[]): Project permissions to grant. Select at least one, or omit to grant all project permissions you can delegate. You must hold every selected permission. Duplicates are ignored. Write permissions do not include Read.
- `type` ("production" | "development"): Ignored. All new keys are project-scoped API keys for any environment.

### Responses

**201**: Project API key created
Response body (`application/json`, object):
- `apiKey` (object, required)
  - `id` (string, required)
  - `name` (string, required)
  - `key` (string, required)
  - `projectId` (string, required)
  - `type` ("production", required): Compatibility field. All project API keys work in any environment.

**400**: Request error
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**401**: Request error
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**403**: Request error
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**404**: Request error
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**413**: Request error
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**429**: Request error
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**500**: Request error
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

Complete OpenAPI 3.1 specification: https://generaltranslation.com/openapi.yaml

OpenAPI schema: [openapi.json](https://generaltranslation.com/openapi.json)

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
