overview.mdx 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ---
  2. title: "Cline API"
  3. sidebarTitle: "Overview"
  4. description: "Programmatic access to AI models through an OpenAI-compatible Chat Completions API."
  5. ---
  6. Welcome to the Cline API documentation. Use the same models that power the Cline extension and CLI from any language, framework, or tool that speaks the OpenAI format.
  7. ## What is the Cline API?
  8. The Cline API is an OpenAI-compatible Chat Completions endpoint. You authenticate once with a Cline API key and get access to models from Anthropic, OpenAI, Google, and more through a single base URL. No need to manage separate keys for each provider.
  9. ```
  10. Your App → Cline API (api.cline.bot) → Anthropic / OpenAI / Google / etc.
  11. ```
  12. <CardGroup cols={2}>
  13. <Card title="Getting Started" icon="rocket" href="/api/getting-started">
  14. Create an API key and make your first request in under a minute.
  15. </Card>
  16. <Card title="Authentication" icon="key" href="/api/authentication">
  17. API keys, account tokens, key rotation, and security best practices.
  18. </Card>
  19. <Card title="Chat Completions" icon="message" href="/api/chat-completions">
  20. Full endpoint reference with request schemas, streaming, and tool calling.
  21. </Card>
  22. <Card title="Code Examples" icon="code" href="/api/sdk-examples">
  23. Ready-to-copy examples for Python, Node.js, curl, and the Cline CLI.
  24. </Card>
  25. </CardGroup>
  26. ## Explore the Reference
  27. <CardGroup cols={3}>
  28. <Card title="Models" icon="brain" href="/api/models">
  29. Browse available models, free tier options, reasoning support, and selection guidance.
  30. </Card>
  31. <Card title="Errors" icon="triangle-exclamation" href="/api/errors">
  32. Error codes, mid-stream errors, retry strategies, and debugging tips.
  33. </Card>
  34. <Card title="Enterprise API" icon="building" href="/enterprise-solutions/api-reference">
  35. Admin endpoints for managing users, organizations, billing, and API keys.
  36. </Card>
  37. </CardGroup>
  38. ## Quick Start
  39. ```bash
  40. curl -X POST https://api.cline.bot/api/v1/chat/completions \
  41. -H "Authorization: Bearer YOUR_API_KEY" \
  42. -H "Content-Type: application/json" \
  43. -d '{
  44. "model": "anthropic/claude-sonnet-4-6",
  45. "messages": [{"role": "user", "content": "Hello!"}]
  46. }'
  47. ```
  48. Get your API key at [app.cline.bot](https://app.cline.bot) (Settings > API Keys), then follow the [Getting Started](/api/getting-started) guide.