{"openapi":"3.0.3","info":{"title":"Agent Cost Compare API","version":"v1","description":"LLM token pricing and AI-agent cost estimates, from the engine behind agentcostcompare.com. All prices are public list prices and directional only — verify with each provider before relying on them.","contact":{"url":"https://agentcostcompare.com/api-docs"}},"servers":[{"url":"https://agentcostcompare.com/api/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"EstimateRequest":{"type":"object","properties":{"presetId":{"type":"string","enum":["coding","support","research","rag","voice"],"description":"Baseline workflow scenario to start from."},"modelId":{"type":"string","description":"Model id (see /models). Defaults to the preset's default model."},"tasksPerMonth":{"type":"number"},"modelCallsPerTask":{"type":"number"},"toolCallsPerTask":{"type":"number"},"handoffs":{"type":"number"},"systemPromptTokens":{"type":"number"},"toolSchemaTokens":{"type":"number"},"retrievedContextTokens":{"type":"number"},"outputTokensPerCall":{"type":"number"},"toolResultTokens":{"type":"number"},"retryRatePct":{"type":"number"},"timeoutLoopsPerTask":{"type":"number"},"hallucinatedToolPct":{"type":"number"},"taskFailureRatePct":{"type":"number"},"promptCaching":{"type":"boolean"}}}}},"paths":{"/meta":{"get":{"summary":"Dataset version and counts","responses":{"200":{"description":"OK"}}}},"/providers":{"get":{"summary":"List providers","responses":{"200":{"description":"OK"}}}},"/models":{"get":{"summary":"List models with list prices","parameters":[{"name":"provider","in":"query","schema":{"type":"string"},"description":"Filter by provider id."},{"name":"tier","in":"query","schema":{"type":"string","enum":["frontier","mid","fast"]}}],"responses":{"200":{"description":"OK"}}}},"/models/{id}":{"get":{"summary":"Get one model by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/presets":{"get":{"summary":"List workflow presets","responses":{"200":{"description":"OK"}}}},"/estimate":{"get":{"summary":"Run the cost model (params via query string)","parameters":[{"name":"presetId","in":"query","schema":{"type":"string"}},{"name":"modelId","in":"query","schema":{"type":"string"}},{"name":"compare","in":"query","schema":{"type":"boolean"},"description":"Rank all models instead of one."}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request"}}},"post":{"summary":"Run the cost model (params via JSON body)","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EstimateRequest"},{"type":"object","properties":{"compare":{"type":"boolean"}}}]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad request"}}}}}}