Zatomic API

Authentication

An API key is required to authenticate all requests to the API. You can view and manage your API keys in your Zatomic account.

Authentication to the API is handled by setting the X-Api-Key request header or by using the api-key querystring parameter. If both are given, the api-key querystring parameter will be used.

For authentication, API calls will fail for the following reasons:

  • Your API key not being sent in the request.
  • Your API key is invalid.

You may also require users of the API to make requests with an API client ID. Similar to an API key, an API client ID is a unique identifier that grants its user access to the API, thus allowing account admins the ability to track who or what is using the API on their behalf.

If API client IDs are required for your account, in addition to your API key, you must make API calls by setting the X-Api-Client request header or by using the api-client querystring parameter. If both are given, the api-client querystring parameter will be used.

If API client IDs are required for your account, API calls will fail for the following reasons:

  • The API client ID not being sent in the request.
  • The API client ID is invalid.

Requiring API clients for the API is managed in your Zatomic account.

Authenticated Request
// With request headers
curl -X GET https://api.zatomic.ai/v1/prompts \
  -H "X-Api-Key: {API key}"

curl -X GET https://api.zatomic.ai/v1/prompts \
  -H "X-Api-Key: {API key}" \
  -H "X-Api-Client: {API client ID}"

// With querystring parameters
GET https://api.zatomic.ai/v1/prompts?api-key={API key}
GET https://api.zatomic.ai/v1/prompts?api-key={API key}&api-client={API client ID}