---
title: "Authenticate with API Key to obtain an API token"
method: POST
path: "/authenticate"
tags: ["API Authentication"]
---

# Authenticate with API Key to obtain an API token

`POST /authenticate`

Clients wishing to interact with the Unitary API must first authenticate by calling this endpoint with a valid API Key in the request body.

The resulting `api_token` should be used in subsequent API requests by including a header with the format:
```
Authorization: Bearer {api_token}
```

The `api_token` will be valid for a period of time (default 24 hours) and should be used for all subsequent API requests until it expires, or is invalidated.

**This endpoint is rate-limited and may return error codes if too many authentication requests are submitted within a short time frame. For this reason clients should avoid re-authenticating too often.**

## Response `200`

Successful Response

- LoginResponse
  - `api_token` string, required
  - `expiry` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/unitary/apis/unitary-content-classification-api.md) · [All operations](https://skmtc.net/unitary/apis/unitary-content-classification-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unitary/unitary-content-classification-api/revisions/5c100d640e2e/schema)
