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

# Get Account Info

> Retrieve account details and credit usage

Get information about your account including your current plan, credit balance, and usage statistics.

This endpoint is free: it does not consume credits and is not rate limited, so you can poll it as often as you like.

## Request

No request body required. Just include your API key in the header.

```bash theme={null}
curl https://api.poof.bg/v1/me \
  -H "x-api-key: pk_your_api_key"
```

## Response

<ResponseField name="organizationId" type="string">
  Your unique organization identifier.
</ResponseField>

<ResponseField name="plan" type="string">
  Your current plan's display name (e.g., "Free", "Basic", "Pro", "Mega", "Ultra", "Giga").
</ResponseField>

<ResponseField name="maxCredits" type="integer">
  Total credits available in your current billing cycle (monthly allocation plus any top-ups).
</ResponseField>

<ResponseField name="usedCredits" type="integer">
  Credits consumed in the current billing cycle. Each successful `/remove` request costs 1 credit.
</ResponseField>

<ResponseField name="autoRechargeThreshold" type="number">
  Fraction of the plan limit at which Auto Recharge triggers, between `0.5` and `0.95` (e.g. `0.9` = 90%). Omitted when Auto Recharge is off.
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "organizationId": "org_abc123xyz",
    "plan": "Pro",
    "maxCredits": 2000,
    "usedCredits": 1234,
    "autoRechargeThreshold": 0.9
  }
  ```
</ResponseExample>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.poof.bg/v1/me \
    -H "x-api-key: pk_your_api_key"
  ```

  ```python Python theme={null}
  from poof import Poof

  client = Poof(api_key="pk_your_api_key")
  info = client.me()

  print(f"Plan: {info['plan']}")
  print(f"Credits remaining: {info['maxCredits'] - info['usedCredits']}")
  ```

  ```typescript TypeScript theme={null}
  import { Poof } from '@poof-bg/js';

  const poof = new Poof({ apiKey: 'pk_your_api_key' });
  const account = await poof.me();

  console.log(`Plan: ${account.plan}`);
  console.log(`Credits remaining: ${account.maxCredits - account.usedCredits}`);
  ```
</CodeGroup>

## Use Cases

### Monitoring Usage

Check your credit consumption before processing a batch:

```python theme={null}
info = client.me()
remaining = info["maxCredits"] - info["usedCredits"]

if remaining < 100:
    print("Warning: Low credits, consider a top-up or upgrade")
```

### Usage Dashboard

Display account info in your application:

```typescript theme={null}
const account = await poof.me();

const usagePercent = (account.usedCredits / account.maxCredits) * 100;
console.log(`Usage: ${usagePercent.toFixed(1)}%`);
```

### Pre-flight Check

Verify credentials and check limits before starting a job:

```python theme={null}
from poof import AuthError

try:
    info = client.me()
    images_to_process = 500
    remaining = info["maxCredits"] - info["usedCredits"]

    if remaining < images_to_process:
        raise Exception(f"Not enough credits. Need {images_to_process}, have {remaining}")

    # Proceed with processing
except AuthError:
    print("Invalid API key")
```

## Error Responses

| Status | Code | Description |
| - | - | - |
| 401 | `authentication_error` | `x-api-key` missing or not recognised |

See [API Error Codes](/errors/list) for the error body format.

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.poof.bg/v1/me \
    -H "x-api-key: pk_your_api_key"
  ```
</RequestExample>


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