API.market Usage API Documentation
Last updated
Last updated
API .market already shows usage analytics in the dashboard, but many teams prefer to pull the same numbers into their own scripts and observability pipelines. The Usage API gives every subscriber a simple, read-only REST endpoint that returns quota, calls made, and renewal dates for each active plan. Because usage metering is part of the core platform, the same pattern works for any product listed on API .market—from a 3D asset generator to FaceSwap V2. (, )
All paths below are appended to this base.
Pass your personal or workspace API key in the custom x-magicapi-key
request header. This keyed-header scheme follows the same convention used by AWS API Gateway and other major providers. (, )
Keep keys secret. They grant full metered access to every subscription under the issuing account.
Accept
application/json
Content-Type
*
application/x-www-form-urlencoded
Kept for historical parity; payload-less GETs ignore it
*Sent for completeness, although GET bodies are ignored per HTTP spec.
Method
GET
Path
/user/usage/{storeSlug}/{apiProduct}/
Auth Required
Yes – x-magicapi-key
Rate Limit
30 requests / minute (burst up to 60)
Success Code
200 OK
Error Codes
401
(invalid key) · 404
(unknown subscription) · 429
(rate-limited)
storeSlug
magicapi
The marketplace “store” that owns the product
apiProduct
faceswap-v2
Field Reference
apiName
string
<store>/<product>
canonical identifier
store
string
Slug of the provider store
apiProduct
string
Slug of the pricing plan / product
quota
int
Monthly (or plan) call allowance
apiCallsLeft
int
Remaining calls in current period
apiCallsMade
int
Calls consumed so far
startDate
ISO-8601
Billing cycle start
renewDate
ISO-8601
Next automatic renewal/refresh
endDate
ISO-8601 | null
Expiry date for one-off plans; usually null
for recurring
Method
GET
Path
/user/usage/
Auth Required
Yes
Success Code
200 OK
The response is an object with a single key, usageData
, which is an array of the per-product schema described above.
401 Unauthorized
Missing or invalid x-magicapi-key
.
{"error":"invalid_api_key"}
404 Not Found
No subscription matches the path.
{"error":"subscription_not_found"}
429 Too Many Requests
Rate-limit exceeded. Retry-After header set.
{"error":"rate_limited"}
5xx
Upstream or gateway fault.
{"error":"server_error"}
Cache locally: Usage numbers change only when you make calls; polling every few minutes is sufficient for most dashboards.
2025-05-17
Initial public release
Happy building!
Request JSON only (, )
Product slug shown in the URL and dashboard ()
Sync with UI analytics: Results match the figures displayed under Analytics → Account Usage in the web console. ()
Custom Usage adjustments: If a seller overrides usage via custom headers or the override endpoint, those changes are reflected instantly in this API. ()
Rotate keys: Treat the x-magicapi-key
like a password; rotate periodically and immediately on suspected compromise. ()
Follow REST conventions when embedding the endpoint in client SDKs for long-term stability. ()