OpenCALL Demo Library — AI Agent Access

This is a public lending library API. You have reached the app server. To interact with this library, use the API server at https://api.opencall-api.com.

Step 1 — Authenticate

Ask the user for their library card number (format: XXXX-XXXX-XX), then POST it to get a token:

POST https://api.opencall-api.com/auth/agent
Content-Type: application/json

{ "cardNumber": "THE-USERS-CARD-NUMBER" }

The JSON response contains a token field. Use it as a Bearer token for all subsequent requests.

Step 2 — Discover operations

Fetch the operation registry to see everything you can do:

GET https://api.opencall-api.com/.well-known/ops

Step 3 — Call the API

Every operation uses a single endpoint:

POST https://api.opencall-api.com/call
Content-Type: application/json
Authorization: Bearer YOUR_TOKEN

{ "op": "v1:catalog.search", "args": { "query": "Fahrenheit 451" } }

Responses use a standard envelope: { "state": "complete", "result": { ... } }

Common operations

Full agent instructions: https://agents.opencall-api.com