Skip to content
Fieldwork
Esc
↑↓navigate↵open⌘Jpreview

check_usage

Return the account’s credits used and remaining in the current period, as the provider reports them. Use before a large job, or to explain a quota error. Changes nothing. Defaults to firecrawl. Set provider to choose another supported provider; Fieldwork never switches providers after an error.

POST/api/v1/tools/check_usage
Authorization
AuthorizationBearer token · headerrequired

A Fieldwork gateway key, issued per agent by the operator. Send it as Authorization: Bearer <key>.

Request body
requiredapplication/json
providerstring
Allowed:firecrawltavilyserpapibrowserbase
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
One of:
object
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
object
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
object
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
object
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
object
maxCharactersinteger

Shared long-text budget for this call; defaults to 20000. Never sent to the provider.

min 1 · max 200000
timeoutinteger

Maximum wait in milliseconds. Resume a returned jobId to collect a long job.

min 1 · max 45000
providerstringrequired
Responses
200

The provider that ran the call and its normalized result.

providerstringrequired
Allowed:firecrawltavilyserpapibrowserbase
requestIdstringrequired
resultobjectrequired
Show properties
breakdownobject
limitnumber
periodEndstring
remainingnumber
usednumber
truncatedobject[]

One entry for each cut text field; absent when nothing was cut.

Show properties
Array of object
lengthintegerrequired

Original character length.

min 0
pathstringrequired
shownintegerrequired

Characters shown before the inline cut note.

min 0
default

A refusal or a failed call. Branch on error.code; never parse the message.

errorobjectrequired
Show properties
codestringrequired
Allowed:AbortedInvalidRequestJobFailedNotAFileNotFoundProviderErrorRateLimitedTimeoutTooLargeUnauthorizedUnsupported
jobIdstring

A job that was already started. Pass it as resume instead of repeating the call.

messagestringrequired
providerstring
retryAfternumber

Seconds to wait.

retryablebooleanrequired

Whether repeating the same call can succeed.

requestIdstring
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST '/api/v1/tools/check_usage' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "firecrawl",
  "timeout": 1,
  "maxCharacters": 1
}'
Response
{
  "provider": "firecrawl",
  "requestId": "string",
  "result": {
    "breakdown": {
      "property1": 0,
      "property2": 0
    },
    "limit": 0,
    "periodEnd": "string",
    "remaining": 0,
    "used": 0,
    "truncated": [
      {
        "length": 0,
        "path": "string",
        "shown": 0
      }
    ]
  }
}

Was this page helpful?