API Reference
Use Bunyan to manage your projects, models, documents, and workflows. For integrations with your own applications, Bunyan provides two public APIs:
Both APIs use an API key created in Bunyan. Send the key using the header shown below.
| API | Use it to | API key header |
|---|---|---|
| LLM API | Call your available LLM configurations from your application | Authorization: Bearer YOUR_API_KEY |
| Document Intelligence | Parse documents, summarize content, extract structured data, and run agentic tasks | X-API-Key: YOUR_API_KEY |
LLM API
Use this production base URL to call your Bunyan LLM configurations:
https://inference-v2.bunyan.ai/v1/- Sign in to Bunyan and select your project.
- Open API Keys and create a key with the
llmscope. - In your application's OpenAI-compatible client, set the base URL above, use your Bunyan key as the API key, and select the model name for the configuration you want to use.
Example Request
Replace YOUR_API_KEY with your Bunyan API key and use a model available to you:
curl -X POST https://inference-v2.bunyan.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "global/glm-5.3-flash",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"temperature": 0.7
}'Manage your model configurations and API keys in Bunyan.
Document Intelligence
Use this production base URL:
https://app.bunyan.ai/rag-agents/api/v1/document-intelligence| Method | Endpoint | Purpose |
|---|---|---|
POST | /parse | Convert a file to Markdown |
POST | /summarize | Summarize text or a file |
POST | /extract | Extract structured data |
POST | /agentic | Run a query with tools and an optional file |
GET | /jobs/{job_id} | Check an asynchronous job and retrieve its result |
Create a project API key with the scopes required for your operation. Send it in the X-API-Key header.
Start with the Document Intelligence quick start for a runnable example, then see limits and usage for file sizes, processing units, and request rates.
Keep Your Key Secure
Store API keys on your server or in a secret manager. Keep them out of browser code and source control. Manage and rotate keys from Bunyan's API Keys page.