# Get current key

Source: https://provod.ai/en/docs/key-current

**`GET /v1/key`**

Read the credential used for this request, its actual spending and remaining key allowance.

## Authentication

`Authorization: Bearer <API_KEY>`: an inference or management key.

The credential determines the workspace. `X-Org-Id` is unsupported.

## Parameters

No request body or parameters are required.

## Response · 200

The data object contains the following fields. usage\* is based on ledger posting time; later refunds do not rewrite these original charges. `usage_weekly` and `usage_monthly` are not the calendar reset windows of a limit.


| Field                                                                 | Type               | Description                                                                                   |
| --------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------- |
| `label`                                                               | string             | Masked key prefix; never the secret.                                                          |
| `currency`                                                            | string             | Billing currency: RUB.                                                                        |
| `checked_at`                                                          | string (date-time) | Time at which this snapshot was read.                                                         |
| `time_zone`                                                           | string             | Reset timezone, UTC or Europe/Moscow. Read this field for existing cabinet limits.            |
| `limit`                                                               | number \| null     | Compatibility ceiling; null when no single limit is represented.                              |
| `limit_reset`                                                         | string \| null     | daily, weekly, monthly; null for lifetime or no limit.                                        |
| `limit_remaining`                                                     | number \| null     | Allowance after spending and reservations, clamped to zero; null without a represented limit. |
| `usage`                                                               | number             | All-time actual charges attributed to the key.                                                |
| `usage_daily`                                                         | number             | Charges since 00:00 UTC today.                                                                |
| `usage_weekly`                                                        | number             | Charges since 00:00 UTC six days ago, including today.                                        |
| `usage_monthly`                                                       | number             | Charges since 00:00 UTC 29 days ago, including today.                                         |
| `spend_limits`                                                        | object\[]          | Exact limit states; empty when there is no key spending ceiling. See fields below.            |
| `creator_user_id`                                                     | string             | User who created the key.                                                                     |
| `workspace_id`                                                        | string \| null     | Workspace selected by the credential.                                                         |
| `expires_at`                                                          | string \| null     | ISO timestamp or null for no expiration.                                                      |
| `is_management_key`                                                   | boolean            | True for management credentials.                                                              |
| `is_provisioning_key, is_free_tier`                                   | boolean            | Both false.                                                                                   |
| `include_byok_in_limit`                                               | boolean            | Always false; BYOK is unsupported.                                                            |
| `byok_usage, byok_usage_daily, byok_usage_weekly, byok_usage_monthly` | number             | Always zero.                                                                                  |
| `organization_id, allowed_data_regions, rate_limit`                   | null               | Compatibility fields; currently null.                                                         |
| `free_model_daily_requests`                                           | object             | used, limit and remaining are numbers, all zero. No free-model quota is advertised.           |


### spend\_limits\[]


| Field                                         | Type               | Description                                                                         |
| --------------------------------------------- | ------------------ | ----------------------------------------------------------------------------------- |
| `period`                                      | string             | daily, weekly, monthly or lifetime.                                                 |
| `limit_amount, spend_amount, reserved_amount` | string             | Exact amounts with eight decimal places in currency.                                |
| `remaining_amount`                            | string             | limit\_amount − spend\_amount − reserved\_amount; can be negative after settlement. |
| `window_started_at, resets_at`                | string (date-time) | Window boundaries. Lifetime does not periodically reset.                            |


### Response example

Identifiers and amounts in these examples are illustrative.


**Response JSON**


```json
{
  "data": {
    "label": "sk_example",
    "currency": "RUB",
    "time_zone": "Europe/Moscow",
    "checked_at": "2026-11-10T12:00:00Z",
    "spend_limits": [],
    "limit": null,
    "limit_reset": null,
    "limit_remaining": null,
    "usage": 0,
    "usage_daily": 0,
    "usage_weekly": 0,
    "usage_monthly": 0,
    "byok_usage": 0,
    "byok_usage_daily": 0,
    "byok_usage_weekly": 0,
    "byok_usage_monthly": 0,
    "include_byok_in_limit": false,
    "is_free_tier": false,
    "is_management_key": false,
    "is_provisioning_key": false,
    "creator_user_id": "user_example",
    "organization_id": null,
    "workspace_id": "workspace_example",
    "expires_at": null,
    "allowed_data_regions": null,
    "free_model_daily_requests": {
      "used": 0,
      "limit": 0,
      "remaining": 0
    },
    "rate_limit": null
  }
}
```



## Request example

Load the key into a server environment variable. TypeScript uses Node.js fetch; Python uses only the standard library.




TypeScript



Python



cURL




```typescript
const response = await fetch("https://api.provod.ai/v1/key", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.API_KEY}`,
  },
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log(await response.json());
```



```python
import json
import os
from urllib.request import Request, urlopen

request = Request(
    "https://api.provod.ai/v1/key",
    method="GET",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
)
with urlopen(request) as response:
    print(json.load(response))
```



```bash
curl --fail-with-body --silent --show-error -X GET \
  "https://api.provod.ai/v1/key" \
  -H "Authorization: Bearer ${API_KEY}"
```



## Errors


| HTTP  | Error        | Cause                                                                                       |
| ----- | ------------ | ------------------------------------------------------------------------------------------- |
| `401` | Unauthorized | Missing, invalid, disabled, revoked or expired key. The `X-Org-Id` header is also rejected. |
| `403` | Forbidden    | Wrong key kind or insufficient workspace access.                                            |


Authentication error example:

```json
{
  "message": "Invalid API key",
  "error": "Unauthorized",
  "statusCode": 401
}
```

## Next steps

* [Management keys](/en/docs/management-keys)
* [Generation charges](/en/docs/generation-metadata)
