API reference
Clients & SDKs
CoinGraph is plain HTTP and MCP, so every language works today. Official SDKs and agent-framework plugins are being published; until then, these are the supported ways in.
| Way in | Status | Use it for |
|---|---|---|
| HTTP from any language | Supported | Every endpoint, with the same envelope: { object, id, as_of, data, sources } |
| Client generated from OpenAPI | Supported | Typed clients in TypeScript, Python, Go and more from /openapi.json |
| MCP SDKs (TypeScript, Python) | Supported | Agents and assistants; see any MCP client |
| CoinGraph SDK for TypeScript and Python | Being published | Typed calls, retries and x402 payment handled for you |
| AgentKit and ElizaOS plugins | Being published | CoinGraph checks as actions inside those agent frameworks |
Plain HTTP #
const res = await fetch("https://coingraph.ai/api/v1/evaluate/chainlink");
const { data, sources } = await res.json();
console.log(data.verdict, data.confidence, sources.length);A typed client from the OpenAPI spec #
The spec at https://coingraph.ai/openapi.json describes every endpoint, parameter and response. Generate types once and call the API with full autocompletion:
npx openapi-typescript https://coingraph.ai/openapi.json -o coingraph.d.ts
npm install openapi-fetchPaying per call #
Paid endpoints answer 402 Payment Required until a payment is attached. The x402 client libraries handle the round trip; the full flow, with a working buyer script, is on Pricing & payments. Design partners skip it with a key: Authorization: Bearer cg_….
✓
Tip
Want the SDK or a framework plugin early? Ask for early access: design partners get it first.