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

# Get the current API key

> Returns the API key making the request and the workspace it belongs to.

Use it to check that a key works.

### Response

**`200`** The key and its workspace.

**object** `string` *required*

Always `api_key`.

**id** `string` *required*

The API key's identifier. Not the secret.

**name** `string | null`

The label given to the key when it was created.

**workspace** `object` *required*

The workspace the key acts for.

**properties**

**id** `string` *required*

The workspace's identifier.

**name** `string` *required*

The workspace's name.

### Errors

| Status | Code | When |
| - | - | - |
| `401` | `invalid_api_key` | The API key is missing, invalid or revoked. |
| `429` | `rate_limited` | Too many requests. Retry after `Retry-After` seconds. |
| `500` | `internal_error` | Something went wrong on our side. Retry with backoff, and with the same `Idempotency-Key` if you sent one. |

Every error uses the same shape. See [Errors](https://docs.data.avina.io/api-reference/errors.md).

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl https://api.avina.io/v1/me \
  -H "Authorization: Bearer $AVINA_API_KEY"
```

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import os
import requests

response = requests.get(
    "https://api.avina.io/v1/me",
    headers={"Authorization": f"Bearer {os.environ['AVINA_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
```

```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
const response = await fetch(`https://api.avina.io/v1/me`, {
  headers: {
    Authorization: `Bearer ${process.env.AVINA_API_KEY}`,
  },
});
const data = await response.json();
console.log(data);
```

```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "object": "api_key",
  "id": "key_3f9a1c",
  "name": "Production server",
  "workspace": { "id": "0b7c8a2e-4d1f-4e39-9a6b-2f5d7c8e9a01", "name": "Acme Inc" }
}
```

```json 401 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key is invalid or revoked.",
    "request_id": "req_8f2a61c09d4e7b3a5f10c2d8"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.