# SDKs

> widar marks AI output for the EU AI Act and California's AI Transparency Act: an invisible watermark and a signed C2PA credential on text, images, audio and video, in one API, by Bynn Intelligence.

Documentation index: https://widar.com/llms.txt

The examples in these docs use invented companies, such as Lumen Labs B.V., and invented values: none is a real check, mark, signature or certificate.

Section: API reference. URL: https://widar.com/docs/sdks

Typed server SDKs for TypeScript, Python, Go and Rust, with your widar workspace. Each reads its key from the environment, retries safely and answers the API's own objects.

Updated December 3, 2026

The SDKs come with a widar workspace: [widar's sales team](https://widar.com/contact) provides them. Every call is also a plain HTTP call to `https://api.widar.com`, shown as curl on every page of the API reference.

## Mark an output

TypeScript:

```typescript
// Client: widar's TypeScript SDK, provided with your workspace
import { readFile, writeFile } from "node:fs/promises";

const widar = new Client(); // reads WIDAR_API_KEY

const marked = await widar.markings.create({
  systemId: "sys_4kT9qWm2RbXe",
  file: await readFile("output.png"),
  contentType: "image/png",
  idempotencyKey: "lumen-out-7731",
});
await writeFile("marked.png", marked.body);
console.log(marked.markId, marked.manifestId);
```

Python:

```python
# Client: widar's Python SDK, provided with your workspace

widar = Client()  # reads WIDAR_API_KEY

with open("output.png", "rb") as f:
    marked = widar.markings.create(
        system_id="sys_4kT9qWm2RbXe",
        file=f,
        content_type="image/png",
        idempotency_key="lumen-out-7731",
    )

open("marked.png", "wb").write(marked.body)
print(marked.mark_id, marked.manifest_id)
```

Go:

```go
client := widar.NewClient() // reads WIDAR_API_KEY

file, _ := os.Open("output.png")
marked, err := client.Markings.Create(ctx, &widar.MarkingCreateParams{
	SystemID:       "sys_4kT9qWm2RbXe",
	File:           file,
	ContentType:    "image/png",
	IdempotencyKey: "lumen-out-7731",
})
if err != nil {
	return err
}
os.WriteFile("marked.png", marked.Body, 0o644)
```

## What every SDK does

- Reads the key from `WIDAR_API_KEY`, or takes it when the client is made. Never logs it.
- Retries a `429`, a `5xx` or a lost connection with backoff, as long as `Retry-After` asks, with the same `Idempotency-Key`, a capped number of times.
- Pages through lists for you, and answers the API's own objects with their fields in your language's case.
- Raises one error type with the API's `code`, `message`, `status` and `request_id`.
- Every SDK passes the same conformance suite before a release.

## Errors

```typescript
// Client and ApiError: widar's TypeScript SDK, provided with your workspace

const widar = new Client(); // reads WIDAR_API_KEY

try {
  await widar.markings.create({ systemId: "sys_4kT9qWm2RbXe", file, contentType: "image/gif" });
} catch (e) {
  if (e instanceof ApiError && e.code === "marking_failed") {
    // held back: the policy fails closed. Do not serve the file.
  }
  throw e;
}
```

Every page in the API reference shows each call in all four languages, beside the API call, the CLI command and the MCP tool. An agent can use the [MCP server](https://widar.com/docs/mcp) at `https://widar.com/mcp` instead.
