Me
curl -H "X-API-Key: $MEALCP_API_KEY" "https://api.mealcp.com/v1/me"{ "name": "Acme Inc", "email": "dev@acme.dev", "monthly_credit_cap": 100000, "credits_remaining": 84210, "window_resets_at": "2026-09-01T00:00:00Z"}Returns the identity, monthly credit cap, and live credit balance behind your API key. The call costs 0 credits - use it freely.
When to call it
Section titled “When to call it”- After receiving a key, to verify it is active before wiring anything up.
- From a dashboard or job runner, to surface remaining credits before long batch runs.
- After a
402from any other endpoint, to check whether the window is genuinely exhausted and when it refills.
| Field | Description |
|---|---|
name, email |
The consumer identity behind the API key |
monthly_credit_cap |
Credit allowance per billing window |
credits_remaining |
Live balance in the current window |
window_resets_at |
RFC 3339 timestamp when the balance resets |
Errors
Section titled “Errors”An invalid or revoked key returns 401 with the standard error envelope.
This endpoint keeps answering even when your credits are gone, so you can
always read window_resets_at and schedule a retry. The window is a rolling
30 days from your first request, and the balance is topped back up to your
cap automatically - see Credits & limits.
Example
Section titled “Example”A nightly job that skips the run when the balance is too low:
credits=$(curl -s -H "X-API-Key: $MEALCP_API_KEY" \ "https://api.mealcp.com/v1/me" | jq -r '.credits_remaining')
[ "$credits" -gt 1000 ] || { echo "low credits: $credits"; exit 1; }