Skip to content

SDKs

Not yet published. The client libraries are being generated from the same OpenAPI documents that power the API reference. Until they ship, call the API directly — it is plain HTTPS with a header, and the reference has a working console.

Two packages, both generated from the live specifications so they cannot drift from the API:

  • TypeScript@riddlerai/sdk
  • .NETRiddlerAI.Sdk

Each wraps the generated operations in a small hand-written client that handles the parts generation does not: base URL, the API key header, correlation IDs, and retry with backoff on 429 and 5xx.

Any HTTP client works. The only platform-specific parts are the base URL and one header:

const response = await fetch(
"https://riddlerai.io:4443/api/llm/v1/chat/completions",
{
method: "POST",
headers: {
"X-API-Key": process.env.RIDDLER_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "auto",
messages: [{ role: "user", content: "Hello" }],
}),
},
);

If you would rather not hand-write types, generate a client yourself now from the same documents the reference uses:

Terminal window
npx openapi-typescript https://riddlerai.io:4443/swagger/services/llm/swagger.json \
-o ./src/riddler-llm.d.ts

The available document slugs are auth, core-os, ml, ai, llm, model-registry, node-registry, earnings, models-catalog and vectordb, plus the Gateway’s own document at /swagger/v1/swagger.json.

Read your key from configuration, never from source. A key committed to a repository is a key that needs revoking.