Skip to main content
GET
Get limits
You get the prepaid balance after the sums reserved by calls in flight, the use of the current period, every unit’s price, the key’s cap on one call and its budgets, its rate and the calls allowed in flight at once, the published bounds of both families, the document types taken, the countries getclean can read from, the recognition languages, the archives, the key’s policy, and the versions served with the current one. There is no estimate operation: max_cost is the protection, and prices gives every unit’s price.

What it costs

The key needs limits:read. The call is free. The answer is 200 with Limits, never cached, since it is the key’s own.

Refused before any work

An unknown query parameter: 400 invalid-request, unknown_field.

Problem types

  • 400 invalid-request, The request is invalid.
  • 401 unauthorized, The key is missing or rejected.
  • 403 insufficient-scope, The key lacks a scope this call needs.
  • 429 rate-limit-exceeded, The rate limit is exceeded; concurrency-limit-exceeded, Too many calls are in flight.
  • 500 internal-error, The service failed.
  • 503 overloaded, The service is overloaded.

Authorizations

Authorization
string
header
required

An API key from https://app.getclean.ai, or an access token issued by https://auth.getclean.ai/realms/getclean, sent as Authorization: Bearer <key> on every call. The scopes a key carries and what a 401 and a 403 say are on the keys and sign-in page.

Headers

traceparent
string

Your own trace id for the call, the W3C Trace Context traceparent header, optional on every operation. getclean logs it with the call, so a request in your traces can be matched to its Request-Id, and never forwards it to a site or a source, a stated departure from W3C Trace Context section 3.4, which asks a vendor to pass it on. A malformed value is ignored, never refused, as the same recommendation asks.

Response

The key's limits and the account's money, as they stand at this call.

Your key's limits and your account's money, the answer of get_limits. Read it once before a batch or a long run: every price, bound and default you may meet stands here. It is the key's own and is never cached.

balance
object
required

Prepaid credit left, after the sums reserved by calls in flight.

usage
object
required

What the account has used in its current billing period, from starts_at to ends_at.

prices
object
required

Every unit's price, keyed by unit name: contents, model_steps, screenshots, document_pages, recognized_pages, searches and datasource_queries, an open set.

caps
object
required

The key's cap on one call, the default run's budget and the key's budget.

rates
object
required

The key's rate: requests per minute, calls in flight at once, and when the minute's window resets; one rate for every operation.

bounds
object
required

The published bounds of both families: every request field's range and default, and the service's own limits.

document_media_types
string[]
required

The document types the upload and a document at a URL take, as IANA media types. The families: the Office formats old and new, ODF, PDF, EPUB, RTF, Markdown, CSV and HWP, with HTML, XHTML, XML, JSON, YAML, plain text and source files. This list is the exact set.

exits
string[]
required

The countries subject_country may name on a fetch, ISO 3166-1 alpha-2.

Pattern: ^[A-Z]{2}$
recognition_languages
string[]
required

The languages text recognition can be asked for on a page with no text layer, BCP 47 tags; another is refused not_allowed.

archives
string[]
required

The archives an as-of fetch consults, by display name.

default_exit
string
required

The country a fetch is made from when it names none, ISO 3166-1 alpha-2.

Pattern: ^[A-Z]{2}$
Example:

"DE"

policy
object
required

The key's settings and minimums, set by the account owner.

versions
object[]
required

Every version served, each with its release and, once announced, its retirement.

current_version
string
required

The version a request without pinned_version runs under.

Example:

"1.0.0"

version_minimum_days
integer
required

The least number of days a version and its configuration keep being served after their change is announced.

Required range: x >= 0
request_id
string
required

This call's id, the same as the Request-Id header.

Pattern: ^req_[A-Za-z0-9]{22}$
Example:

"req_01ZWyyr8KwLQuLkEAedYvD"