Answer: Set the OpenAI Python SDK's `base_url` to the Cline API endpoint and send the `X-Response-Format: openai` header so non-streaming responses use the standard OpenAI shape. Status: Confirmed Entry: tool/cline/integrations/cline-api-openai-python-sdk Revision: 1 Digest: sha256:3dd7af0369ef0dc2 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:06:16Z Last changed: 2026-11-13T03:06:16Z Last verified: 2026-11-20T12:26:42Z Next check: 2026-11-21T12:26:42Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of base_url | https://api.cline.bot/api/v1 | [1] | 2026-11-20 required header | X-Response-Format: openai | [1] | 2026-11-20 default_headers | {"X-Response-Format": "openai"} | [1] | 2026-11-20 Sources: [1] Cline. "Code Examples". https://docs.cline.bot/api/sdk-examples.md Role: primary. Accessed: 2026-11-20T12:26:42Z Quote: "base_url="https://api.cline.bot/api/v1"" (Supports: base_url) Quote: "Send the `X-Response-Format: openai` header so non-streaming responses use the standard OpenAI shape" (Supports: required header) Quote: "default_headers={"X-Response-Format": "openai"}" (Supports: default_headers) Published: 2026-11-20T06:01:40Z Snapshot SHA-256: ecc4ad73a2c1e93e7754ee5e5c081323ba3a49b5f0c320b797080d60d2d12d56 (captured 2026-11-15T12:27:04Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:06:16Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:26:42Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:26:42Z Last attempt: 2026-11-20T12:26:42Z Notes and limitations: Extracted automatically from a single official source (section "OpenAI SDK"). Related: https://latestn.com/tool/cline/integrations/configure-api-keys What API keys do I need to configure for the Cline GitHub Actions integration? https://latestn.com/tool/cline/integrations/configure-aws-cli-sso-profile How do I configure Cline to use an AWS CLI profile with SSO for AWS Bedrock authentication? https://latestn.com/tool/cline/integrations/configure-cline-aws-bedrock-iam-credentials How do I configure Cline to use AWS Bedrock with IAM access key and secret key credentials? https://latestn.com/tool/cline/integrations/chat-completions-request-headers What request headers does the Cline Chat Completions endpoint require? https://latestn.com/tool/cline/integrations/cline-api-curl-streaming How do I make a streaming request to the Cline API with curl? https://latestn.com/tool/cline/integrations/cline-api-nodejs-fetch How do I call the Cline API from Node.js using fetch? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:06:16Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cline/integrations/cline-api-openai-python-sdk/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cline/integrations/cline-api-openai-python-sdk POST: https://latestn.com/dispute/tool/cline/integrations/cline-api-openai-python-sdk with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cline/integrations/cline-api-openai-python-sdk?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I use the Cline API with the OpenAI Python SDK? Revision 1, last verified 2026-11-20T12:26:42Z. https://latestn.com/tool/cline/integrations/cline-api-openai-python-sdk (accessed 2026-11-21T09:53:59Z). @misc{LatestN_tool_cline_integrations_cline_api_openai_python_sdk_r1, title = {How do I use the Cline API with the OpenAI Python SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cline/integrations/cline-api-openai-python-sdk}}, note = {Revision 1; digest sha256:3dd7af0369ef0dc2; last verified 2026-11-20T12:26:42Z; accessed 2026-11-21T09:53:59Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cline/integrations/cline-api-openai-python-sdk