Documentation menu

Authentication

Last updated: 2026-10-22

Every API request authenticates with an API key sent in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Create a key

Create keys under API keys in your dashboard. A key starts with sk_. All keys of an account share its credits, task history and limits.

Send the key

Header Params

Authorizationstringrequired

Bearer, one space, then an active API key.

Example:
Bearer sk_…
curl 'https://api.nsfwcheckapi.com/v1/predictions/TASK_ID' \
  -H 'Authorization: Bearer YOUR_API_KEY'

A missing, malformed or revoked key returns 401 with error code invalid_api_key.

Keep keys safe

  • Call the API from your server. Never put a key in browser or mobile app code, a public repository or logs.
  • Use a separate key for each service, so you can revoke one without affecting the others.
  • Revoking a key stops new submissions and queries made with it at once. Tasks it already submitted still finish, and any other active key of the same account can query them.
  • Never send a full key to support; give the task ID or order number instead.