Reference
Reference
Use Reference when you need an exact method, endpoint, or wire contract. The TypeScript SDK and REST API expose the same /v1 resources; Protocols documents the response, streaming, error, identifier, and pagination contracts shared between them.
Choose an interface
TypeScript SDK
Use the typed backend client and AI SDK-native generation helpers.
REST API
Call the backend-only HTTP interface directly.
Protocols and contracts
Inspect shared objects, streams, errors, IDs, and pagination rules.
One request, three views
The SDK method maps directly to an HTTP operation, and both return the shared Agent contract.
const agent = await client.agents.get("ag_0123456789abcdef");
// GET /v1/agents/ag_0123456789abcdef -> AgentStart with Getting started if you do not yet have an API key and Agent.