Skip to content

API Keys

API keys authenticate requests to the PromptJang API.

List API Keys

GET /api/v1/keys

Response

json
{
  "keys": [
    {
      "id": "key_abc123...",
      "name": "Production key",
      "prefix": "pj_live_451560fa",
      "created_at": "2026-05-26T12:00:00Z"
    }
  ]
}

Only the prefix is returned (not the full key).

Create API Key

POST /api/v1/keys

Request Body

json
{
  "name": "Production key"
}

Response

HTTP 201 Created
json
{
  "id": "key_abc123...",
  "name": "Production key",
  "key": "pj_live_451560faf7e81b894ff13cdefd27fb0f1017ffbb9721fea67b133c8360360623",
  "prefix": "pj_live_451560fa",
  "created_at": "2026-05-26T12:00:00Z"
}

The full key is shown only once. Store it securely.

Delete API Key

DELETE /api/v1/keys/:id

Response

HTTP 200 OK
json
{
  "message": "API key deleted"
}

Released under the MIT License.