# General Translation Platform: Créer une clé API de projet
URL: https://generaltranslation.com/fr/docs/platform/openapi/reference/projects/create-project-api-key.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Crée une clé API de projet. Nécessite project:api_keys:write ; une clé de projet ne peut pas créer d’autres clés.

{/* Ce fichier a été généré par Fumadocs. Ne le modifiez pas directement. Pour toute modification, relancez la commande de génération. */}

## Endpoint

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

**Operation ID:** `createProjectApiKey`

**Tags:** `Projects`

**Summary:** Create a Project API key

Create a project API key. Requires `project:api_keys:write`; project keys cannot create other keys.

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

### Parameters

- `projectId` (path, string, required)
- `gt-api-version` (header, "2026-10-08.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. Each successful request creates a new key. Store the returned secret securely.
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**: The request is malformed or failed validation.
Response body (`application/json`, object):
- `error` (string, required)

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

**401**: Authentication is missing or invalid.
Response body (`application/json`, object):
- `error` (string, required)

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

**403**: The caller is authenticated but not allowed to perform this operation or access the requested resource, or cannot grant a selected permission. No key is created.
Response body (`application/json`, object):
- `error` (string, required)

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

**404**: The requested resource was not found.
Response body (`application/json`, object):
- `error` (string, required)

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

**413**: The request, or the data it would return, exceeds a size or item limit.
Response body (`application/json`, object):
- `error` (string, required)

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

**415**: The request body's Content-Type is missing or not supported. Send the body as application/json.
Response body (`application/json`, object):
- `error` (string, required)

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

**429**: Too many requests. The rate limit was exceeded.
Response body (`application/json`, object):
- `error` (string, required)

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

**500**: An unexpected server error occurred.
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.
