Reference

Credits

Check the remaining credit balance for your account. A read-only call that never deducts credits.

Returns the credit balance for the account tied to your API key. This is a read-only check — it never deducts credits. Use it to surface remaining quota in your dashboard or to gate calls before you spend credits.

Endpoint

POSThttps://app.pedra.ai/api/credits

Pass your apiKey in the JSON body as with every other endpoint, or — since this is a read-only check — as a query parameter on a GET request: GET /api/credits?apiKey=YOUR_API_KEY.

curl -X POST https://app.pedra.ai/api/credits \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_API_KEY"
  }'

# Or, since it's read-only, a simple GET:
curl "https://app.pedra.ai/api/credits?apiKey=YOUR_API_KEY"

Response

Returns 200 with the current balance:

JSON
{
  "plan": "pro",
  "creditsRemaining": 87
}

Response fields

  • plan — your account plan: free or pro.
  • creditsRemaining — credits still available for generations. Matches the balance shown in the Pedra editor.

How credits are spent

Each operation deducts a fixed number of credits — image calls cost 1–2, and animated video frames cost 5 each (static frames are free). See Pricing for the full breakdown and Errors & limits for what happens when you run out.