How to turn any REST API into a governed AI tool
Upload an OpenAPI spec. Cadreen auto-generates governed tools from every endpoint — credential-aware, failure-classified, health-checked.
Register your OpenAPI spec
One call. Cadreen reads the spec, generates tool definitions for every endpoint, and registers them in the capability graph.
curl -X POST https://api.cadreen.com/api/v1/cadreen/connections/openapi \
-H "Authorization: Bearer $YOUR_SIGN_IN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoicing API",
"spec_url": "https://api.example.com/openapi.json",
"secret": "inv_sk_..."
}'Type the API's key once, as secret. Cadreen reads from the spec how the API wants it (a bearer token, a key in a header, or username:password) and sends it only to that API's own address. Adding a key takes a person signed in as a workspace admin or the owner: a call made with an API key and a secret is refused (403 person_required). With an API key, send the credential_id of a key already saved instead. The answer says how many tools were registered (tools_registered) and whether one real read worked (check).
OpenAPI spec → Cadreen auto-generates governed tools for every endpoint
Use the tools from any surface
The tools are now available to the model in any conversation. Ask in natural language — Cadreen routes to the right tool.
> Create an invoice for $500 for Acme Corp, due in 30 days
[Calling create_invoice(amount: 500, customer: "Acme Corp", due_days: 30)]
Invoice created: inv_abc123 for $500, due July 21.What does Cadreen send?
- Each value goes where your spec puts it (the path, the query, a header, a cookie or the body), written the way your spec says. Numbers are sent exactly as they were given.
- A field your spec doesn't declare is never sent. The call is refused and names the field. If your API takes extra fields, say so in the spec with
additionalProperties. - A body goes out as JSON, or as a form when that is all the operation takes (payment and messaging services work this way). In a form, a field your spec doesn't say how to send, such as an object with no encoding, is refused when you give it; the rest of the call works without it.
- An operation that takes only a multipart body (a file upload) isn't a tool yet.
- When Cadreen refuses a call like this, nothing reached the service.
Or register an MCP server
If you have an MCP (Model Context Protocol) server, register it the same way. Cadreen probes /.well-known/mcp and lists the tools the server offers.
curl -X POST https://api.cadreen.com/api/v1/cadreen/connections/mcp \
-H "Authorization: Bearer $CADREEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Team Tools",
"url": "https://mcp.example.com/mcp",
"token": "mcp_sk_..."
}'Cadreen sends the token to the server as a bearer token. An API key with the connections.write scope may make this call.