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

# API Credit Balance

> Execute a workflow with custom input parameters and receive the full generated result.

# Balance API

Check your account credit balance using your API key.

## Endpoint

**GET** `/api/v1/balance`

## Authentication

Send your API key in the `Authorization` header:

```
Authorization: Bearer YOUR_API_KEY
```

## Example Request

```bash theme={null}
curl -X GET "https://aitutor-api.vercel.app/api/v1/balance" \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxx"
```

## Success Response (200)

```json theme={null}
{
  "success": true,
  "credits": 1234
}
```

| Field   | Type    | Description              |
| ------- | ------- | ------------------------ |
| success | boolean | Always `true` on success |
| credits | number  | Current credit balance   |

## Error Responses

**401 Unauthorized** — Missing or invalid API key.

```json theme={null}
{
  "error": "Unauthorized. Please provide a valid secret key.",
  "success": false
}
```

**429 Too Many Requests** — Rate limit exceeded.

```json theme={null}
{
  "error": "Rate limit exceeded",
  "success": false
}
```

**500 Internal Server Error** — Server error.

```json theme={null}
{
  "error": "Failed to retrieve balance, please try again or contact support.",
  "success": false,
  "code": "internal_server_error"
}
```

## Response Headers

| Header                | Description                  |
| --------------------- | ---------------------------- |
| x-ratelimit-limit     | Rate limit per window        |
| x-ratelimit-remaining | Remaining requests in window |
