Grade a conversation with AI credits

Grade a call, email, text, note, or demo transcript and deduct AI Credits from the team.

The ledger line is Sales Coach grading, scoped to the team. Nothing is charged when the model fails, pricing cannot be resolved, or the balance cannot cover the grade. The balance must cover the most this grade can cost (maxCredits from GET /ai/credits) before the model runs; the charge is the actual usage, which is usually much less. A repeated idempotency key returns the original grade and does not charge again. The same key with a different body is a 409.

Send the key as an Idempotency-Key header or as idempotencyKey in the body. The billing record is kept so a later retry still does not double-charge; the HTTP replay cache lasts 24 hours.

objectType plus id reads that record (call transcript, email subject and body, text message, or note). A call id can be any id from GET /api/partner/calls, CRM or Trav AI (source: ai). content grades raw text and is required for demo. A stored record's read scope is required on widget and OAuth tokens.

result is the JSON object the model returns. A reply that is not valid JSON is a 502 grading_failed and is not charged.

402 insufficient_credits includes the spendable balance and requiredCredits, what the balance had to cover. Buy Credits and Auto Top-up are unchanged. A 402 does not count toward the token's circuit breaker.

Rate limit. Same as the rest of the Partner API: per team, not per token — 300 requests/minute by default, or 600 with a registered System ID. Every API token on the team shares the allowance.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required
Allowed:
uuid | null

Record to grade. Not used for demo. For call, a CRM or Trav AI call id from GET /api/partner/calls.

string | null

Raw text. Required when id is omitted. Ignored when id is set.

required

Instructions or a JSON rubric. String or object.

string
length ≤ 255

Same role as the Idempotency-Key header. The header wins if both are sent and they must match.

Headers
string
length ≤ 255

Retry-safe key. Required if idempotencyKey is not in the body. A repeat returns the original grade.

Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json