Skip to main content

API Reference

The Bedrock API is a REST API for building and managing autonomous AI agents.

Base URL

https://api.bedrock.orinlabs.org

Authentication

All requests require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
See Authentication for details on obtaining and using API keys.

Request Format

Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body

Send JSON for POST, PUT, and PATCH requests:
{
  "name": "My Agent",
  "model": "claude-sonnet-4"
}

Response Format

Success Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "My Agent",
  "status": "sleeping",
  "created_at": "2024-01-15T10:30:00Z"
}

List Response (Paginated)

{
  "results": [...],
  "pagination": {
    "total_count": 100,
    "limit": 50,
    "offset": 0,
    "has_more": true
  }
}

Error Response

{
  "detail": "Not found."
}
Validation errors include field details:
{
  "name": ["This field is required."],
  "model": ["Invalid model specified."]
}

HTTP Status Codes

CodeDescription
200 OKRequest succeeded
201 CreatedResource created
204 No ContentDeleted successfully
400 Bad RequestInvalid request or validation error
401 UnauthorizedMissing or invalid API key
403 ForbiddenValid key but insufficient permissions
404 Not FoundResource not found

Products

Base path: /api/products/

Products

MethodEndpointDescription
GET/products/List products
POST/products/Create product
GET/products/{id}/Get product
PATCH/products/{id}/Update product
DELETE/products/{id}/Delete product
POST/products/{id}/assign_default_adapters/Assign default adapters
GET/products/{id}/usage/Get usage stats

API Keys

MethodEndpointDescription
GET/api-keys/List API keys
POST/api-keys/Create API key
DELETE/api-keys/{id}/Delete API key

Agents

Base path: /api/cloud/
MethodEndpointDescription
GET/agents/List agents
POST/agents/Create agent
GET/agents/{id}/Get agent
PATCH/agents/{id}/Update agent
DELETE/agents/{id}/Delete agent
POST/agents/{id}/run/Wake/run agent
POST/agents/{id}/stop/Stop running agent
POST/agents/{id}/reset-memory/Clear agent memory
GET/agents/{id}/usage/Get agent usage stats

Usage Records

MethodEndpointDescription
GET/usage/List usage records
GET/usage/summary/Aggregated usage summary

Adapters & Tools

Base path: /api/toolbox/

Adapters

MethodEndpointDescription
GET/adapters/List adapters
POST/adapters/Create adapter
GET/adapters/{id}/Get adapter
PATCH/adapters/{id}/Update adapter
DELETE/adapters/{id}/Delete adapter

Adapter Configs

MethodEndpointDescription
GET/adapter-configs/List configs
POST/adapter-configs/Create config
GET/adapter-configs/{id}/Get config
PATCH/adapter-configs/{id}/Update config
DELETE/adapter-configs/{id}/Delete config

Tools

MethodEndpointDescription
GET/tools/List tools
POST/tools/Create tool
GET/tools/{id}/Get tool
PATCH/tools/{id}/Update tool
DELETE/tools/{id}/Delete tool

Memory

Base path: /api/memory/
MethodEndpointDescription
POST/agents/{id}/log-messages/Log messages to memory
GET/agents/{id}/memory-context/Get formatted memory context
GET/agents/{id}/messages/Get recent raw messages

Tracing

Base path: /api/tracing/

Traces

MethodEndpointDescription
GET/traces/list/List traces (paginated)
POST/traces/Create trace
GET/traces/{id}/Get trace with spans
POST/traces/{id}/end/End trace

Spans

MethodEndpointDescription
GET/spans/List spans
POST/spans/Create span
GET/spans/{id}/Get span
PATCH/spans/{id}/Update span
POST/spans/{id}/end/End span
POST/spans/{id}/flag/Flag span for review

Evals

MethodEndpointDescription
GET/evals/List eval test cases
POST/evals/Create eval test case

Default State (Built-in Adapters)

Base path: /api/defaults/

Contacts

MethodEndpointDescription
GET/contacts/List contacts
POST/contacts/Create contact
GET/contacts/{id}/Get contact
PATCH/contacts/{id}/Update contact
DELETE/contacts/{id}/Delete contact

Documents

MethodEndpointDescription
GET/documents/List documents
POST/documents/Create document
GET/documents/{id}/Get document
PATCH/documents/{id}/Update document
DELETE/documents/{id}/Delete document

Projects

MethodEndpointDescription
GET/calendars/projects/List projects
POST/calendars/projects/Create project
GET/calendars/projects/{id}/Get project
PATCH/calendars/projects/{id}/Update project
DELETE/calendars/projects/{id}/Delete project

SMS Messages

MethodEndpointDescription
GET/sms/messages/List SMS messages (read-only)

OpenAPI Specification

The complete OpenAPI 3.0 spec is available at:
  • Interactive Docs: https://api.bedrock.orinlabs.org/api/docs/
  • ReDoc: https://api.bedrock.orinlabs.org/api/redoc/
  • Raw Schema: https://api.bedrock.orinlabs.org/api/schema/