---
agent:
  instructions: "Use this search API to find relevant Cook Studio content (product, pricing, FAQ, blog articles, example videos) with keywords or natural-language queries instead of crawling pages. Results are returned in Markdown."
  endpoint: "https://cookstudio.ai/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
title: "Authentication"
description: "API keys, where to keep them and what happens if one leaks."
---
# Authentication

Every request needs a key in the `Authorization` header:

```bash
curl https://app.cookstudio.ai/api/v1/me -H "Authorization: Bearer $KEY"
```

## Keys

- Create keys in the app under [API Keys](https://app.cookstudio.ai/api-keys). You can have up to 5 active keys and give each a name (one per server or project).
- A key starts with `cs_live_` and is shown **once**. We store only a SHA-256 hash, so we cannot show it again.
- Revoking a key takes effect on the next request.

## Keep keys on your server

Do not put a key in a browser, a mobile app or a public repository. The API sends no CORS headers on purpose, so browser calls fail. Call it from your backend and pass results to your front end.

## If a key leaks

Revoke it in the app and create a new one. Orders are prepaid from credits, so a leaked key can never spend more than your balance.

Canonical: https://cookstudio.ai/docs/authentication
