# Usage endpoint

Send authenticated `GET /v1/me/usage`, inspect weekly and monthly windows and plan context, and compare the response before and after a controlled request.

## Where this lives

Use a trusted local or server-side API client.

The Foxora API provides OpenAI-compatible chat completions plus account, usage, and public model-discovery endpoints. Authenticated routes currently accept a signed-in Foxora account access token.

> **Safety:** Treat the complete account access token as a secret. Do not paste it into prompts, commit it to a repository, expose it in client-side bundles, or include it in logs, screenshots, and support messages.

## Steps

1. Use a trusted local or server-side API client.
2. Send authenticated `GET /v1/me/usage`.
3. Inspect weekly and monthly windows and plan context.
4. Compare the response before and after a controlled request.
5. **Confirm the result.** Inspect HTTP status, response headers, request identifiers, usage fields, and the parsed response; cross-check account or usage endpoints after a small request.

## Choose the right path

- Use `/v1/chat/completions` for OpenAI-compatible generation.
- Use `/v1/me` and `/v1/me/usage` for account and usage state.
- Use `/v1/models` to discover model identifiers instead of hardcoding assumptions.

## Request

```bash
curl "https://api.foxora.ai/v1/me/usage?days=30" \
  -H "Authorization: Bearer $FOXORA_ACCESS_TOKEN"
```

Choose a supported day range, validate the returned interval, and keep Foxora-managed usage separate from BYOK provider billing.


## Confirm it worked

- Inspect HTTP status, response headers, request identifiers, usage fields, and the parsed response; cross-check account or usage endpoints after a small request.
- The screen, command, file, run, or destination named in this guide reflects the expected state.
