- Document processing is asynchronous. Every create and update answers at once with status
pending, then moves through partitioning, chunking and indexing. Polldocuments.getuntilstatusisready(usable, including summaries) orfailed. The document is searchable once it reachesindexed. responses.createbills LLM usage with the deep-search model. It runs as a job too: pollresponses.getuntilstatusiscompletedorfailed. Plan exhaustion answers HTTP 402, which the plugin never retries.connections.deleteis a POST, not a DELETE. Withkeep_files: falseevery document the connector ingested is deleted and cannot be recovered; withkeep_files: truethe documents survive unlinked. Deletion is asynchronous, so files can linger briefly either way.webhookEndpoints.createreturns the signingsecret. Store it somewhere safe (webhookEndpoints.get and list return it too), then give it to the plugin aswebhookSecret(or the account’s webhook signature). Deliveries are{ type, payload, nonce }signed withX-Signature(hex HMAC-SHA256 of the raw body); the plugin checks it and handles document status, document deleted, entity extracted, connection sync started, progress and finished, connection limit and partition limit events.nonceis unique per delivery.connections.createOAuthRedirectUrlstarts an OAuth connector flow (Google Drive, Notion and similar) and returns a short-lived URL; non-OAuth connectors (S3, GCS, Freshdesk, Zendesk, Intercom, web crawler) are created directly withconnections.create. With your own OAuth app, register it withauthenticators.createand connect throughauthenticators.createConnection.- Partitions. Reads, deletes and updates take
partitionas a request header (Ragie ignores it in the query); creates take it in the body. Omitted means thedefaultpartition.partitions.*creates, limits and deletes partitions; deleting one deletes every document in it. - Billing and risk levels. Every document create and update,
connections.create,connections.sync,authenticators.createConnection,instructions.createandresponses.createprocesses pages or runs a model that the plan bills, so they are marked destructive and the permission check runs first. Plan exhaustion answers 402, which the plugin never retries. - Entity extraction.
instructions.createruns a prompt with a JSON schema over matching documents; read the results withinstructions.listEntitiesordocuments.listEntities, and failures withinstructions.listExtractionLogs. - Files.
documents.getSourcereturns the original file anddocuments.getChunkContenta chunk as text, audio, video or image (media_type), both as core file output (text inline, other files base64 or a host file id). - Shapes. Request and response shapes come from Ragie’s Speakeasy SDK (ragie 2.0.0), which is generated from api.ragie.ai/openapi.json. Responses are parsed leniently. Rate limits are undocumented: a 429 is retried three times with backoff, honouring
Retry-After.
- 54 typed API operations
- 8 incoming webhook event types
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Ragie API key before the first call: More: API Key
pnpm corsair setup --plugin=ragie --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Search documents for chunks about refundsWebhooks
This plugin registers 8 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then usewebhookHooks on the plugin factory.
See Webhooks for every event path and payload shape, and Webhooks concept for routing.
What’s next
API reference
Every
ragie.api.* operation with input and output types.Webhooks
Event paths, payloads, and
webhookHooks examples.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.