Protocols and contracts
Look up the objects, errors, streams, IDs, pagination, and limits that every SDK method and endpoint shares.
Some rules apply to every endpoint: how errors look, how streams end, how to page through a list, what an ID means, and how large a request can be. These pages collect those rules in one place. Each SDK and REST page covers its own operation and links here for the shared parts.
Streaming protocol
Choose the correct stream, headers, consumption model, and failure handling.
Objects and schemas
Look up public resource shapes, mutability, nullability, and status values.
Errors
Handle REST envelopes, SDK errors, and failures after streaming begins.
Resource IDs
Recognize public ID formats while treating identifiers as opaque values.
Pagination and filtering
Traverse keyset pages, poll transcripts, and apply resource-specific filters.
Service limits
Design around enforced resource, payload, query, and execution bounds.
Examples
Streaming a completion follows the streaming protocol and reports failures through the error contract:
const result = await client.completion({ agentId, prompt: "Summarize this." });
for await (const delta of result.textStream) {
process.stdout.write(delta);
}Listing sessions over REST uses IDs, pagination, objects, errors, and limits together:
curl "$BLAZING_AGENTS_BASE_URL/v1/agents/$AGENT_ID/sessions?limit=50" \
-H "Authorization: Bearer $BLAZING_AGENTS_API_KEY"Next
- REST API for every endpoint.
- TypeScript SDK or Python SDK for language-native clients.
- Generation and streaming to put streams to work.