API Reference
Usage
Query API call counts and credit consumption for your account or a specific API key. Every credit-deducting request is logged — usage data is available within seconds of each call.
GET
/api/v1/usage🔑 Auth requiredReturns a summary of API calls and credits consumed, broken down by endpoint and by day. The response is automatically scoped to the API key used. Pass ?keyId= to query a different key on your account.
- daily always contains one entry per day in the requested window, even for days with zero activity.
- key is included only when the response is scoped to a specific API key.
- byEndpoint keys are the internal action names (image_to_html, code_export, figma_export). Use the label field for display.
- Credits in this response are absolute values (positive integers), not signed deductions.
- Upload calls (0 credits) are not logged and will not appear in usage data.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
days | number | No | Lookback window in days. Accepted values: 1–90. Default: 30. |
keyId | string | No | Filter results to a specific API key ID (must belong to your account). When omitted and authenticated with an API key, defaults to that key. |
Response
{ "period": { "start": "2026-03-13T00:00:00.000Z", "end": "2026-04-12T14:30:00.000Z", "days": 30 }, "key": { "id": "clxyz01abc", "name": "Production Key", "lastUsed": "2026-04-12T14:29:00.000Z" }, "summary": { "totalCalls": 47, "totalCredits": 855, "byEndpoint": { "image_to_html": { "calls": 20, "credits": 600, "label": "Image → HTML" }, "code_export": { "calls": 18, "credits": 270, "label": "Export Code" }, "figma_export": { "calls": 9, "credits": 90, "label": "Figma Export" } } }, "daily": [ { "date": "2026-04-10", "calls": 5, "credits": 90 }, { "date": "2026-04-11", "calls": 12, "credits": 225 }, { "date": "2026-04-12", "calls": 8, "credits": 150 } ]}Fetch your usage
# Last 30 days for the authenticated keycurl "https://www.floow.design/api/v1/usage" \ -H "Authorization: Bearer fl_your_api_key"
# Filter to a specific key, last 7 dayscurl "https://www.floow.design/api/v1/usage?keyId=clxyz01abc&days=7" \ -H "Authorization: Bearer fl_your_api_key"Scoping by key
- Default: the response is scoped to the API key used in the request — no extra params needed.
- Different key: pass
?keyId=<id>to query any other key that belongs to your account.