Headers
All REST API requests require two headers that together identify the caller and the organization being accessed:| Header | Value | Description |
|---|---|---|
x-api-key | Your API key | Issued by Artanis. Treat it like a password. |
x-org-slug | Organization slug | The slug of the organization you want to read from. Visible in the dashboard URL. |
Never commit your API key to version control or expose it in client-side code. Rotate it immediately if it leaks.
Example
curl https://app.artanis.ai/api/prompts?projectSlug=my-project \
-H "x-api-key: $ARTANIS_API_KEY" \
-H "x-org-slug: my-org"
import os
import requests
response = requests.get(
"https://app.artanis.ai/api/prompts",
params={"projectSlug": "my-project"},
headers={
"x-api-key": os.environ["ARTANIS_API_KEY"],
"x-org-slug": "my-org",
},
)
const res = await fetch("https://app.artanis.ai/api/prompts?projectSlug=my-project", {
headers: {
"x-api-key": process.env.ARTANIS_API_KEY!,
"x-org-slug": "my-org",
},
});
Errors
| Status | Meaning |
|---|---|
401 | Missing or invalid x-api-key, or no Clerk session if you’re calling without an API key |
403 | The requested project or resource does not belong to the organization in x-org-slug |
404 | Resource does not exist |