Skip to main content
The TypeScript SDK is not on npm yet. Its package, @ic/agentic-id-sdk (version 0.1.0), is private. Until it is published, call the REST API directly. The API reference lists every endpoint: API reference.

Call the API without the SDK

Any HTTP client works. Send your API key as a Bearer token.

What the SDK is

A typed client with one method per product. Request and reply types come from the same schemas the API validates with.

Create a client

string
Your API key. Falls back to the AGENTIC_ID_API_KEY environment variable. The constructor throws when neither is set.
string
The API address. Falls back to the AGENTIC_ID_URL environment variable, then to a local address. Set it.
number
default:"300000"
Per call, in milliseconds. Discover can take minutes.
function
A fetch implementation to use in place of the global one.

One call per product

Not in the SDK today: GET /v1/workspace, GET /v1/credits and POST /v1/feedback. The SDK does not send an Idempotency-Key and does not retry. It authenticates with an API key only.

Errors

A response that is not 2xx throws AgenticIdError.
A network failure or a timeout throws the underlying fetch error, not AgenticIdError. Codes and what to do: Errors.