> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.conductorquantum.com/api-reference/coda-api/usage/threads/get/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conductorquantum.com/_mcp/server. # Thread Usage GET https://api.conductorquantum.com/v0/coda/usage/threads/{thread_id} Post-hoc credit and token cost for every run on a conversation thread (`X-Thread-Id`). A thread rollup is not the complete ledger because `thread_id` attach is best-effort. Accepts `mcp:read` or `agents:run`. Reference: https://docs.conductorquantum.com/api-reference/coda-api/usage/threads/get ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `thread_id` (string, required) ### Headers - `x-api-path` (string, optional, nullable) ## Response ### 200 Successful Response - `thread_id` (string, required) - `requested_credits` (double, required) - `charged_credits` (double, required) - `tokens` (TokenUsage, required) — Metered model tokens. Prompt = input; completion = output. - `runs` (list of UsageRun, required) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### TokenUsage Metered model tokens. Prompt = input; completion = output. - `prompt` (integer, required) - `completion` (integer, required) - `total` (integer, required) ### UsageRun One AI-agent charge. job_id is the public X-Run-Id (or webapp run UUID). - `job_id` (string, required) - `run_id` (string, required) - `source` (string, required) - `status` (string, required) - `budget` (string, required) - `requested_credits` (double, required) — Authorization hold reserved when the run started - `charged_credits` (double, required) — Credits actually deducted after settlement or debt - `tokens` (TokenUsage, required) — Metered model tokens. Prompt = input; completion = output. - `created_at` (string, required) - `thread_id` (string, optional, nullable) - `team_id` (string, optional, nullable) - `billed_team_id` (string, optional, nullable) — Team wallet that was debited, when spend used the shared team wallet - `billable_credits` (double, optional, nullable) — Metered settlement amount, if priced - `settled_at` (string, optional, nullable) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `input` (any, optional) - `ctx` (ValidationErrorCtx, optional) ### ValidationErrorLocItems ### ValidationErrorCtx ## Examples **Response** ```json { "thread_id": "22222222-2222-4222-8222-222222222222", "requested_credits": 0.25, "charged_credits": 0.184321, "tokens": { "prompt": 1200, "completion": 340, "total": 1540 }, "runs": [ { "job_id": "11111111-1111-4111-8111-111111111111", "run_id": "11111111-1111-4111-8111-111111111111", "source": "public_agents_api", "status": "settled", "budget": "high", "requested_credits": 0.25, "charged_credits": 0.184321, "tokens": { "prompt": 1200, "completion": 340, "total": 1540 }, "created_at": "2026-08-20T15:04:00+00:00", "thread_id": "22222222-2222-4222-8222-222222222222", "team_id": "33333333-3333-4333-8333-333333333333", "billable_credits": 0.184321, "settled_at": "2026-08-20T15:04:12+00:00" } ] } ``` **SDK Code** ```python conductorquantum from conductorquantum import ConductorQuantum client = ConductorQuantum(token="") thread = client.coda.usage.threads.get("22222222-2222-4222-8222-222222222222") print(thread) ``` ```javascript const url = 'https://api.conductorquantum.com/v0/coda/usage/threads/:thread_id'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.conductorquantum.com/v0/coda/usage/threads/:thread_id" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.conductorquantum.com/v0/coda/usage/threads/:thread_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.conductorquantum.com/v0/coda/usage/threads/:thread_id") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.conductorquantum.com/v0/coda/usage/threads/:thread_id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.conductorquantum.com/v0/coda/usage/threads/:thread_id"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.conductorquantum.com/v0/coda/usage/threads/:thread_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```