# DARKOZA JavaScript / TypeScript SDK

Version 0.1.0 · API v1 · Node.js 18+.

The SDK uses the standard Fetch API and has no runtime dependencies.
Import DarkozaClient from index.mjs. Use index.d.ts for TypeScript types.

    import { DarkozaClient } from "./index.mjs";
    const key = await DarkozaClient.createKey({ name: "my-service" });
    const client = new DarkozaClient({ apiKey: key.api_key });
    const result = await client.chat({
      messages: [{ role: "user", content: "Explain event-driven architecture." }],
      task: "reasoning",
    });
    console.log(result.answer);
    console.log(await client.usage());

The one-time management_token can revoke only its matching key. Never embed
credentials in browser bundles or commit them to source control. v1 supports
text messages and non-streaming responses.
