> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys

Every request to the Graphy Agents API is authenticated with an API key. You create and manage keys in the **Graphy console**, then send the key as a Bearer token on each request.

## Get your API key

1. Go to the [Graphy console](https://agents.graphy.dev/console/).
2. Sign in with Google or GitHub.
3. Open the **API keys** section.
4. Click **Create key**, give it a name (for example `production`), and confirm.
5. **Copy the key right away** — it's shown only once and cannot be retrieved later. Store it in a secrets manager or an environment variable.

<Note>
  Keys look like `graphy_…`. You can keep up to **5 active keys** at a time — create separate keys for development and production, and revoke any you no longer use from the same page in the console.
</Note>

## Use your key

Send the key in the `Authorization` header as a Bearer token on every request:

```
Authorization: Bearer graphy_xxxxxxxxxxxxxxxxxxxxxxxx
```

With the TypeScript SDK, pass it as `apiKey`:

```typescript theme={null}
import { GraphyAiSdk } from '@graphysdk/agents-sdk';

const ai = new GraphyAiSdk({
  apiKey: process.env.GRAPHY_API_KEY, // your graphy_… key
  baseUrl: 'https://agents.graphy.dev',
});
```

See [Authentication](/agents/rest/authentication) for the full header reference and authentication error codes.

## Keep your keys safe

<Warning>Never expose API keys in client-side code. Call the Agents API from your backend only.</Warning>

* Store keys in environment variables or a secrets manager.
* Use separate keys for development and production.
* Rotate keys periodically and revoke unused ones in the console.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/agents/quickstart">
    Generate your first chart in 5 minutes
  </Card>

  <Card title="Authentication" icon="lock" href="/agents/rest/authentication">
    Headers, base URL, and error codes
  </Card>
</CardGroup>
