API referenceProjects

Mint a key scoped to one project

A long-lived API key (default 30 days, up to 90) for a CLI session on this project (typecut dev / typecut add).

It reaches only /projects/{id}/… and POST /uploads (which files into this project), plus GET /me; it cannot mint keys. Listed and revocable in Settings → API keys. Free.

POST
/projects/{id}/cli-tokens

Authorization

bearerAuth
AuthorizationBearer <token>

Typecut API key. Generate one in app.typecut.ai → Settings → API keys. Send as Authorization: Bearer tc_live_….

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/cli-tokens" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "token": "string",
    "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5",
    "prefix": "string",
    "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
    "expires_at": "string",
    "scope": "project:6f1c…",
    "usage": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}