Skip to content

API Keys ​

API keys authenticate requests to the PromptJang API.

List API Keys ​

GET /api/v1/keys

Response ​

json
{
  "keys": [
    {
      "id": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
      "name": "Production key",
      "key_prefix": "pj_live_4515",
      "created_at": 1787736000,
      "last_used_at": 1787822400
    }
  ]
}

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

Create API Key ​

POST /api/v1/keys

Request Body ​

json
{
  "name": "Production key"
}

Response ​

HTTP 200 OK
json
{
  "id": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "name": "Production key",
  "key": "pj_live_FULL_KEY_SHOWN_ONCE"
}

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

Delete API Key ​

DELETE /api/v1/keys/:id

Response ​

HTTP 200 OK
json
{
  "deleted": true
}

Restrictions ​

  • Cannot delete the API key used to authenticate the request
  • Cannot delete your last API key
  • Cannot create more than five keys in one organization

Released under the MIT License.