managing-cloud-usage
Use when the user asks about quota, billing visibility, or processed-page counts. Covers GET /v1/usage — query params, response shape, when to report usage proactively to the user.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- managing-cloud-usage
- description
- Use when the user asks about quota, billing visibility, or processed-page counts. Covers GET /v1/usage — query params, response shape, when to report usage proactively to the user.
03 SKILL.md 正文
Managing cloud usage
GET /v1/usage is the only endpoint for quota and billing visibility.
It returns aggregate counters for the queried period plus the remaining
quota for the project.
Endpoint
GET https://api.kreuzberg.dev/v1/usage
Authorization: Bearer $KREUZBERG_API_KEY
Query parameters
| Param | Format | Default |
|---|---|---|
start |
ISO-8601 date (e.g. 2026-03-01) |
First day of current month. |
end |
ISO-8601 date (e.g. 2026-04-01) |
First day of next month. |
Both are optional. Omit both for the current calendar month.
Response (200)
{
"period_start": "2026-05-01",
"period_end": "2026-06-01",
"total_pages": 5432,
"total_documents": 87,
"total_failed": 2,
"quota_limit": 100000,
"quota_remaining": 94568,
"by_mime_type": {
"application/pdf": { "documents": 65, "pages": 3200, "failed": 1 },
"image/png": { "documents": 15, "pages": 1800, "failed": 0 },
"text/plain": { "documents": 7, "pages": 432, "failed": 1 }
}
}
Reading the response
total_pages— pages billed in the period. The unit of cost.total_documents— files submitted, regardless of page count.total_failed— extractions that ended infailedstatus. Failed jobs do not consume quota.quota_limit/quota_remaining— total and remaining pages on the current plan.by_mime_type— per-MIME breakdown. Useful for identifying which document types drive cost.
Examples
Current-month usage
curl -s https://api.kreuzberg.dev/v1/usage \
-H "Authorization: Bearer $KREUZBERG_API_KEY" | jq .
Specific date range
curl -s "https://api.kreuzberg.dev/v1/usage?start=2026-01-01&end=2026-02-01" \
-H "Authorization: Bearer $KREUZBERG_API_KEY" | jq .
Quota remaining as a percentage
curl -s https://api.kreuzberg.dev/v1/usage \
-H "Authorization: Bearer $KREUZBERG_API_KEY" \
| jq '.quota_remaining * 100 / .quota_limit'
When to report usage to the user
Pull usage proactively when:
- A batch job submits more than ~100 documents — report
quota_remainingafter submit so the user can see the impact. - The user asks "how much have I used?" or any quota-shaped question.
- A
429response includes a quota-exhausted error — surface the usage shape so the user can decide whether to upgrade. - After a long-running crawl finishes, since page count is hard to estimate up front.
Don't report usage on every routine extraction — it's noise.
Errors
| Status | Cause |
|---|---|
400 |
start or end not ISO-8601, or end <= start. |
401 |
Bad API key. |
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.