cavi-ai/
@cavi-ai/api-clientv0.11.0 stable
GitHub ↗

Runtime client

RuntimeClient is the common v0.11.0 interface. Every implementation supports capability discovery and startRun; retrieval, cancellation, streaming, and batch methods are optional. Codex startRun starts a stored background response, so its initial normalized status can be started or running; use getRun to reach a terminal result as shown in the request example.

This client mirrors and verifies upstream-compatible behavior. Upstream runtimes remain the canonical protocol owners.

Referenced examples

Verified example · TypeScript

Runtime node

examples/runtime-node.ts

@cavi-ai/api-clientv0.11.048adfa6b
TypeScript · complete source
import { CodexApiClient } from "@cavi-ai/api-client/providers/codex/runtime";

export async function runQuickstart(apiKey: string) {
  const client = new CodexApiClient({
    apiKey,
    defaultModel: "gpt-5",
  });
  let run = await client.startRun({
    input: "Summarize why capability checks matter in one sentence.",
  });

  while (run.status === "started" || run.status === "running") {
    await new Promise((resolve) => setTimeout(resolve, 1_000));
    run = await client.getRun(run.run_id);
  }

  return run;
}

Package imports

Referenced by

Artifact provenance
Package
@cavi-ai/api-client@0.11.0
Release
v0.11.0
Commit
48adfa6ba7c3d5e8ffee0a6cf2572574ca630fa0
Source
examples/runtime-node.ts
Tarball SHA-256
3379cd47b4890d0e00f5949583f90a83367705878b16141e825f66ef5d8819e5
Content SHA-256
306450f08c69a6e068f80490b1f2cc4f0808af0911fdec5b9b145e33a9ba5534