Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fluximage.io/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint returns a snapshot of your account’s current plan, compression usage, and AI credit balances. Use it to check whether you have remaining capacity before submitting a batch, or to surface usage data in your own tooling.

Request

Method: GET
URL: https://fluximage.app/api/usage
Authorization: Bearer flx_live_your_key_here
No request body is required.

Example request

curl https://fluximage.app/api/usage \
  -H "Authorization: Bearer flx_live_your_key_here"

Response

200 OK

{
  "plan": "pro",
  "compressor_used": 45,
  "compressor_limit": 99999,
  "ia_credits_used": 120,
  "ia_credits_monthly": 1000,
  "ia_topup_credits": 200,
  "ia_credits_remaining": 1080,
  "canCompress": true,
  "canUseIA": true,
  "topups": {
    "small": "...",
    "medium": "...",
    "large": "..."
  }
}
For Pro and Agency plans, compressor_limit returns a large number indicating effectively unlimited compressions. Use canCompress as the authoritative check for whether you can compress in the current period.

Response fields

plan
string
Your current subscription plan. Possible values: free, starter, pro, agency.
compressor_used
number
Number of images you have compressed in the current billing period.
compressor_limit
number
Maximum images you can compress per billing period on your current plan.
ia_credits_used
number
Number of AI credits consumed from your monthly allocation in the current billing period.
ia_credits_monthly
number
Total AI credits included in your plan each month. 0 on the free plan.
ia_topup_credits
number
Additional AI credits you have purchased as top-ups. These are consumed after your monthly allocation is exhausted.
ia_credits_remaining
number
Total AI credits still available, combining remaining monthly credits and top-up credits: (ia_credits_monthly − ia_credits_used) + ia_topup_credits.
canCompress
boolean
true if you have remaining compression capacity for the current billing period.
canUseIA
boolean
true if you are on a paid plan and have at least one AI credit remaining.
topups
object
Contains keys small, medium, and large corresponding to the three AI credit top-up bundles available for purchase. You can use these values to initiate a checkout session for the desired pack size.

Error codes

StatusErrorDescription
401UnauthorizedThe API key is missing or invalid.