Every request to the Artnex API must include a valid API key. The API uses Bearer token authentication — you pass your key in theDocumentation Index
Fetch the complete documentation index at: https://docs.artnex.app/llms.txt
Use this file to discover all available pages before exploring further.
Authorization HTTP header, and the server validates it before processing your request.
Get your API key
Log in to your Artnex account
Go to artnex.ai and sign in.
Open your profile settings
Click your avatar in the top-right corner and select Profile Settings from the dropdown menu.
Navigate to the API section
Select the API tab in your settings. Click Generate API Key to create a new key.
Pass your API key in requests
Include your key as aBearer token in the Authorization header:
Content-Type: application/json for all POST requests.
Example requests
Handle 401 Unauthorized errors
A401 Unauthorized response means the API could not validate your key:
| Cause | Fix |
|---|---|
Missing Bearer prefix | Use Authorization: Bearer YOUR_KEY, not just Authorization: YOUR_KEY |
| Extra whitespace in the header | Ensure there are no leading or trailing spaces around your key |
| Revoked or expired key | Generate a new key in your profile settings |
| Wrong environment key | Confirm you are using a key from the correct account |
Keep your API key secure
Best practices:- Store your key in an environment variable (e.g.,
ARTNEX_API_KEY) and read it at runtime. - Use a secrets manager such as AWS Secrets Manager, HashiCorp Vault, or Doppler in production environments.
- Rotate your key regularly and immediately if you suspect it has been compromised.
- Use separate keys for development, staging, and production so you can revoke them independently.