Skip to content

Deterministic pre-flight credit quote for a study plan_spec

POST
/credits/estimate
curl --request POST \
--url https://app.discotrace.com/api/v1/credits/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "plan_spec": { "roster": "consumer", "surfaces": [ "openai", "claude", "gemini", "perplexity", "google_ai_overviews" ], "personas": [ "VP of Operations", "Head of IT" ], "situations": [ "Replacing legacy tool", "Evaluating compliance fit" ], "active_cells": 9, "precision": "standard", "scope": "pass1_baseline", "cadence": "one_off", "include_preference": true, "shown_cells": 4, "edit_tests": 1 } }'

Requires read scope. Computes exact credits (1 credit = 1 completed graded answer on Consumer surfaces), stage breakdown, total AI responses, and whether the run fits inside auto_approve_credits.

Media typeapplication/json
object
plan_spec

Study matrix, AI surface roster, precision preset, and scope configuration.

object
roster
string
default: consumer
Allowed values: consumer enterprise_frontier enterprise_max
surfaces
Array<string>

Example

[
"openai",
"claude",
"gemini",
"perplexity",
"google_ai_overviews"
]
personas
Array<string>

Example

[
"VP of Operations",
"Head of IT"
]
situations
Array<string>

Example

[
"Replacing legacy tool",
"Evaluating compliance fit"
]
active_cells
integer

Example

9
precision
string
default: standard
Allowed values: standard high_precision
scope
string
default: pass1_baseline
Allowed values: pass1_baseline recheck_pass2 free_discovery
cadence
string
default: monthly
Allowed values: one_off monthly biweekly
include_preference

Run supplied-page Preference diagnostics (default true on Pass 1, false on Pass 2+).

boolean
shown_cells
integer

Example

4
edit_tests
integer

Example

1

Deterministic credit and volume quote.

Structured error payload with remediation link (resolveUrl).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
resolveUrl
required
string format: uri
details
object
key
additional properties
any

Example

{
"error": {
"code": "insufficient_scope",
"message": "API key is missing required scope 'run'.",
"retryable": false,
"resolveUrl": "https://app.discotrace.com/w/acme/api"
}
}

Structured error payload with remediation link (resolveUrl).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
resolveUrl
required
string format: uri
details
object
key
additional properties
any

Example

{
"error": {
"code": "insufficient_scope",
"message": "API key is missing required scope 'run'.",
"retryable": false,
"resolveUrl": "https://app.discotrace.com/w/acme/api"
}
}