## API Keys Use API keys to integrate Chatto agents into your own applications. ### Creating an API Key 1. Go to **Dashboard → Resources → API** 2. Click **Create API Key** 3. Give it a name (e.g., "Production App") 4. Choose an expiration date (optional) 5. Save the key securely ### Important - **Save your key immediately** — You won't be able to see it again - **Keep it secret** — Never share API keys publicly - **Use environment variables** — Store keys in your app's config, not in code - **Rotate regularly** — Create new keys and delete old ones periodically ### Using API Keys Include your key in API requests to authenticate: ``` Authorization: Bearer chatto_sk_your_key_here ``` ### What You Can Do via API | Action | Description | |--------|-------------| | List agents | Get all your agents | | Chat | Send messages and get responses | | Stream | Get responses as they're generated | | Voice | Initiate voice calls | ### Seeing What Each Key Does On **Dashboard → Resources → API**, the **Usage by key** card shows, for the last 7, 30 or 90 days, each key's calls, failed calls, tokens, cost and when it was last used, with the agent it calls most. - Click **Export CSV** to download the same period as a spreadsheet: one row per day, key and agent (calls, failed calls, tokens and cost in USD). - Calls are attributed to a key from the day this feature was released. Earlier calls cannot be tied to a key and are not shown. - Cost is what your requests with that key were charged, including searching your knowledge and any teammates the agent asked for, so a key can show a cost even for a day with few calls. - Only your own keys appear, and only you can download them. ### Rate Limits Your API key has usage limits based on your plan. Monitor usage in the dashboard.