# General Translation Platform: プロジェクト API Key の作成
URL: https://generaltranslation.com/ja/docs/platform/openapi/reference/project/create-api-key.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 選択したプロジェクトの API key を作成します。project:api_keys:write が必要で、リクエストの識別情報が保持しているプロジェクトの権限のみを委譲します。プロジェクト API Key の作成に関する API リファレンス。

{/* このファイルは Fumadocs により生成されています。直接編集しないでください。変更する場合は、生成コマンドを再実行してください。 */}

## 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.
