Skip to main content
Developer APIs are in AlphaAlpha

These APIs are fully functional and available for use. However, API contracts may change without versioning. We recommend checking the documentation regularly for updates.

For Developers

Integrate with Refine's REST API or connect AI tools via the Model Context Protocol (MCP)

MCP

Model Context Protocol (MCP)

MCP is an open standard that lets AI assistants interact with external tools and data sources directly. Connect your preferred AI tool to Refine with a single endpoint.

  1. 1Add the Refine MCP endpoint URL to your AI tool's configuration
  2. 2Your tool will handle OAuth authentication automatically
{ "mcpServers": { "refine": { "url": "https://api.refine.ink/mcp" } } }

OAuth is the default authentication method. Your MCP client will handle the authorization flow automatically.

MCP can also use API keys for authentication.

REST API

REST API

A RESTful API with interactive OpenAPI documentation. Explore all available endpoints, request and response schemas, and try requests directly from the browser.

  1. 1Create an API key in your profile's Advanced Settings
  2. 2Use the key to authenticate your requests
# 1. Upload a document UPLOAD=$(curl -s -X POST "https://api.refine.ink/documents/upload" \ -H "X-API-Key: your-api-key" \ -F "file=@paper.pdf") TASK_ID=$(echo $UPLOAD | jq -r '.task_id') # 2. Wait for upload processing via SSE curl -N "https://api.refine.ink/documents/upload/events/$TASK_ID?token=your-api-key" # Listen until you receive: event: complete, data: {"document_id": "..."} DOCUMENT_ID="<document_id from SSE>" # 3. Start document processing (costs 1 credit) PROCESS=$(curl -s -X POST "https://api.refine.ink/documents/$DOCUMENT_ID/process" \ -H "X-API-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{"preview": false}') HISTORY_ID=$(echo $PROCESS | jq -r '.history_id') # 4. Stream processing progress via SSE curl -N "https://api.refine.ink/documents/$DOCUMENT_ID/process/events/$HISTORY_ID?token=your-api-key"

Keep your API keys secure. Do not commit them to version control or expose them in client-side code.

Start Building

Developer APIs are in alpha — we welcome your feedback as we continue to develop them.