Authentication

All API requests require an API key passed in the X-API-Key header.

Header format

X-API-Key: your_api_key_here

Example

import requests

headers = {
    "X-API-Key": "your_api_key_here",
    "Content-Type": "application/json"
}

resp = requests.post("https://dish-embed.latimal.com/embed", headers=headers, json={
    "items": ["Butter Chicken"]
})
curl -X POST https://dish-embed.latimal.com/embed \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"items": ["Butter Chicken"]}'

Error responses

Missing or invalid API key returns HTTP 401:

{
  "detail": "Invalid or missing API key"
}

Credit-based billing

API usage is billed per credit. Different endpoints consume different amounts based on compute cost. Check your remaining balance with the /balance endpoint:

resp = requests.get("https://dish-embed.latimal.com/balance", headers=headers)
print(resp.json()["credits_remaining"])

Security notes

  • Store your API key in environment variables, not in source code
  • Rotate your key if it's ever exposed in logs, commits, or client-side code
  • Each key is tied to one account. Do not share keys across teams or services