Every API call that does work is made with an API key. This page explains how to send it and what the errors mean.
Where the API lives
The base address is https://app.h2i.davixlabs.io. Every endpoint starts with /v1/, for example https://app.h2i.davixlabs.io/v1/images/resize.
Send the key in a header
Use either header:
X-Api-Key: YOUR_KEY
Authorization: Bearer YOUR_KEY
Keys in the query string or in the body are refused with api_key_location_not_allowed, because addresses end up in logs and browser history. Get a key from Dashboard > API Keys.
Test the key
curl -H "X-Api-Key: $DAVIX_H2I_API_KEY" https://app.h2i.davixlabs.io/v1/account
A good key returns your account details. GET /v1/capabilities needs no key and shows what the server offers.
With an SDK
The official clients take the key once, send it only in a header and never print it. In Python, for example:
import os
from davix_h2i import H2I
h2i = H2I(os.environ["DAVIX_H2I_API_KEY"])
print(h2i.capabilities.account()) # your plan, limits and usage
Pick your language in Choose your SDK.
Authentication errors
| Code | HTTP | Meaning |
|---|---|---|
invalid_api_key |
401 | The key is missing, incomplete, deleted or replaced |
key_expired |
401 | The key reached its expiry date |
api_key_location_not_allowed |
400 | The key was sent in the address or body |
forbidden |
403 | The operation needs an individual customer key |
endpoint_not_allowed |
403 | Your plan does not include this tool |
Which operations need a personal key
Tools run with any valid key. Account operations (keys, usage, jobs, history) and background jobs with async need an individual customer key, not a shared or public one.
Good habits
- Never expose a key in browser code. Call the API from your server.
- Use one key per application and rotate keys on a schedule.
- The official SDKs send the key only as a header and never print it.
Next: Call a tool over REST.
Checked against API contract 3.0.0.
