This guide walks you through creating an API key and making your first Chat Completions request.Documentation Index
Fetch the complete documentation index at: https://docs.cline.bot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Cline account at app.cline.bot
curlor any HTTP client (Python, Node.js, etc.)
Create an API Key
Sign in to app.cline.bot
Go to app.cline.bot and sign in with your account.
Make Your First Request
ReplaceYOUR_API_KEY with the key you just created:
Verify the Response
You should get a JSON response like this:choices[0].message.content field contains the model’s reply. The usage field shows how many tokens were consumed.
Try Streaming
For real-time output, setstream: true. The response arrives as Server-Sent Events:
data: line. The stream ends with data: [DONE].
Try a Free Model
To test without spending credits, use one of the free models:Troubleshooting
| Problem | Solution |
|---|---|
401 Unauthorized | Check that your API key is correct and included in the Authorization header |
402 Payment Required | Your account has insufficient credits. Add credits at app.cline.bot |
| Empty response | Make sure messages is a non-empty array with at least one user message |
| Connection timeout | Verify your network can reach api.cline.bot. Check proxy settings if on a corporate network |
Next Steps
Authentication
Learn about API keys, token scoping, and security practices.
Chat Completions
Full endpoint reference with all parameters and options.
Models
Browse available models and find the right one for your use case.
SDK Examples
Use the API from Python, Node.js, or the Cline CLI.

