Skip to content

Estimate the tokens and cost of a full review before it starts (REQ-104).

GET
/docs/{docId}/runs/estimate
curl --request GET \
--url https://example.com/api/v1/docs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/runs/estimate
docId
required
string format: uuid

The ID of one spec doc.

The estimate.

Media typeapplication/json
object
calls
required
integer
cached_steps
required
integer
tokens_in
required
integer format: int64
tokens_out
required
integer format: int64
cost_usd
number
priced
required

False when the reviewer role has no prices, so there is no cost.

boolean
Examplegenerated
{
"calls": 1,
"cached_steps": 1,
"tokens_in": 1,
"tokens_out": 1,
"cost_usd": 1,
"priced": true
}

An error.

Media typeapplication/problem+json

RFC 9457 problem details with a stable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required

A stable machine-readable error code.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example"
}