> For the complete documentation index, see [llms.txt](https://docs.january.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.january.ai/rest-api/authentication.md).

# Authentication and client tokens

Backend services use account API keys. Mobile and browser clients use short-lived client tokens so an account credential never ships to an end-user device.

Mint client tokens only from a login-protected endpoint on your backend. Derive `end_user_id` from the authenticated session rather than accepting it from the request body.

{% openapi src="<https://partners.january.ai/v1.2/openapi.json>" path="/v1.2/auth/client-tokens" method="post" %}
<https://partners.january.ai/v1.2/openapi.json>
{% endopenapi %}

{% openapi src="<https://partners.january.ai/v1.2/openapi.json>" path="/v1.2/auth/client-token-revocations" method="post" %}
<https://partners.january.ai/v1.2/openapi.json>
{% endopenapi %}
