Skip to content

Me

Terminal window
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.

  • 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 402 from 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

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.

A nightly job that skips the run when the balance is too low:

Terminal window
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; }