List recent usage
https://api.imagemcpserver.com/v1/usageThe same request log the dashboard shows, scoped to the account behind your key. Useful for reconciling a credit balance that dropped further than expected, or for confirming that a fire-and-forget batch actually ran. Pass ?limit= to control how many entries come back — 20 by default, 100 at most.
Overview
Read the account's most recent requests, newest first, with what each one cost.
This endpoint never deducts credits.
Request
Headers
| Field | Type | Description |
|---|---|---|
Authorizationrequired | string | Bearer <IMAGEMCP_API_KEY>. The header x-api-key: <key> is accepted as an alternative. |
Query parameters
| Field | Type | Description |
|---|---|---|
limit | number | How many entries to return, newest first. Defaults to 20, clamped to 100. |
Examples
This endpoint is REST only — there is no MCP tool or CLI command for it.
curl "https://api.imagemcpserver.com/v1/usage" \
-H "Authorization: Bearer $IMAGEMCP_API_KEY"const res = await fetch("https://api.imagemcpserver.com/v1/usage", {
headers: { Authorization: `Bearer ${process.env.IMAGEMCP_API_KEY}` },
});
const data = await res.json();
console.log(data.logs);import os
import requests
res = requests.get(
"https://api.imagemcpserver.com/v1/usage",
headers={"Authorization": f"Bearer {os.environ['IMAGEMCP_API_KEY']}"},
timeout=30,
)
print(res.json())Response
Response fields
| Field | Type | Description |
|---|---|---|
count | number | Number of entries returned. |
logs[].model | string | Model that served the request. |
logs[].prompt | string | Prompt recorded with the request. |
logs[].status | string | Outcome, e.g. "200 OK". |
logs[].latency | string | Wall-clock time for that call. |
logs[].creditsDeducted | number | Credits taken for that call. |
logs[].createdAt | string | ISO timestamp of the call. |
{
"success": true,
"count": 2,
"logs": [
{
"id": "6712c0f4a91b4c2f9d0e5b02",
"model": "google/gemini-2.5-flash-image",
"prompt": "Cyberpunk city street at night",
"status": "200 OK",
"latency": "4.21s",
"creditsDeducted": 15,
"createdAt": "2026-09-04T10:12:31.882Z"
},
{
"id": "6712c0f4a91b4c2f9d0e5b01",
"model": "google/gemini-2.5-flash-image",
"prompt": "Minimalist lightning bolt icon",
"status": "200 OK",
"latency": "2.04s",
"creditsDeducted": 5,
"createdAt": "2026-09-04T10:11:58.114Z"
}
]
}When it fails
success: false with a message. See errors & troubleshooting for the status codes and whether a retry is worth it.FAQ
Does this show requests made by my MCP client too?
Yes. MCP tool calls, CLI runs and REST calls all write to the same log, because they all resolve to the same account.
How far back does the log go?
The endpoint returns the newest 100 entries at most. For a longer history, export from the dashboard.