AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Connecting the Poe OpenAI-Compatible API to Code Editors and Automation Scripts

Nicolas Henriet · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Connecting Poe to modern development environments eliminates the tedious chore of managing separate developer accounts, API credentials, and prepaid balances across Anthropic, OpenAI, Google, and xAI. By providing a standard OpenAI-compatible gateway (https://api.poe.com/v1), Poe allows developers to route requests from AI code editors like Cursor, Continue, and Cline, as well as standalone automation scripts, directly into frontier LLMs—all backed by a single API key and drawn from a unified Poe compute points balance.

365Finds considers Poe’s OpenAI-compatible endpoint one of the most cost-effective, frictionless reverse-proxy architectures available for multi-model coding workflows. While direct provider APIs remain superior for enterprise production backends requiring custom fine-tuning and SLAs, Poe is our recommended gateway for individual engineers, prototypes, and local agentic coding setups where multi-model flexibility outweighs raw microsecond latency.


Why Route Development Workflows Through Poe?

Modern software engineering with AI increasingly requires switching between models based on task requirements: Claude 3.5 Sonnet or Claude Sonnet 4.6 for complex refactoring and UI layout, GPT-4o or GPT-5.4 for concise logic and broad tooling, and Gemini 1.5 Pro or Gemini 3.1 Pro for massive context digestion.

Under conventional API setups, achieving this requires:

Poe replaces this fragmented stack with a unified layer:


Step 1: Generate Your Poe API Key

Before configuring your tools, you must obtain an API key linked to your Poe user account:

  1. Open your browser and navigate to Poe API Keys.
  2. Log in with your active Poe account.
  3. Click Create API Key (or copy your existing key).
  4. Store the key securely in an environment variable on your local machine:
export POE_API_KEY="your-poe-api-key-here"

Security Warning: The API key has access to your entire Poe account point balance. Never commit it to git repositories or expose it in client-facing browser bundles.


Core Endpoint Specifications

Poe’s API mirrors the OpenAI specification. Use these core connection parameters across all third-party extensions and HTTP clients:

ParameterConfiguration ValueNotes
Base URLhttps://api.poe.com/v1Must include /v1; trailing slash optional depending on client
Auth HeaderAuthorization: Bearer $POE_API_KEYStandard Bearer token authentication
Chat Endpoint/v1/chat/completionsSupports standard streaming (stream: true) and sync modes
Responses Endpoint/v1/responsesAdvanced format for reasoning, web search, and structured output
Model Listing/v1/modelsReturns available bots queryable by your account
Rate Limit500 requests per minuteDefault per-user quota across all models

Model Naming Rules

In Poe’s OpenAI-compatible layer, the model parameter corresponds to the exact bot handle on Poe. Names are case-insensitive, but cannot contain whitespace:


Step 2: Configuring AI Code Editors

1. Cline (VS Code Autonomous Agent Extension)

Cline is an autonomous coding agent designed for deep refactoring and multi-file code editing. It natively supports OpenAI-compatible endpoints:

  1. Install the Cline extension in VS Code.
  2. Open the Cline panel in the sidebar and click the Settings (⚙️) icon.
  3. In the API Provider dropdown, select OpenAI Compatible.
  4. Configure the fields as follows:
    • Base URL: https://api.poe.com/v1/
    • API Key: Paste your POE_API_KEY.
    • Model ID: Enter Claude-Sonnet-4.6 or Claude-3.5-Sonnet.
  5. Save settings and start a task in the chat window. Cline will orchestrate tool calls and file edits using your Poe points.

2. Continue (VS Code & JetBrains)

Continue is an open-source AI code assistant supporting custom model routing. You can configure Poe via its config.json:

  1. Open Continue and navigate to Settings -> Open config.json.
  2. Add Poe models to the models array using the openai provider:
{
  "models": [
    {
      "title": "Claude 3.5 Sonnet (Poe)",
      "provider": "openai",
      "model": "Claude-3.5-Sonnet",
      "apiKey": "YOUR_POE_API_KEY",
      "apiBase": "https://api.poe.com/v1"
    },
    {
      "title": "GPT-4o (Poe)",
      "provider": "openai",
      "model": "GPT-4o",
      "apiKey": "YOUR_POE_API_KEY",
      "apiBase": "https://api.poe.com/v1"
    },
    {
      "title": "Gemini 1.5 Pro (Poe)",
      "provider": "openai",
      "model": "Gemini-1.5-Pro",
      "apiKey": "YOUR_POE_API_KEY",
      "apiBase": "https://api.poe.com/v1"
    }
  ]
}
  1. Save the file. You can now toggle seamlessly between Anthropic, OpenAI, and Google frontier models directly in the Continue dropdown during chat and edit sessions.

3. Cursor

Cursor allows overriding the OpenAI base URL for conversational and Composer features:

  1. Open Cursor and navigate to Cursor Settings -> Models.
  2. In the OpenAI API Key field, paste your POE_API_KEY.
  3. Toggle on Override OpenAI Base URL.
  4. Enter https://api.poe.com/v1 as the custom URL.
  5. In the model list, add the Poe bot identifiers (such as Claude-Sonnet-4.6 or GPT-4o).
  6. Important Architecture Caveat: While this directs Cursor Chat and inline editing through Poe, Cursor's background predictive tab completion utilizes internal custom pipelines and does not route through arbitrary OpenAI-compatible proxies. 365Finds recommends using Continue or Cline inside standard VS Code if you require fully transparent multi-model agent execution.

Step 3: Querying Poe from Automation Scripts

Python (Using Official openai SDK)

Because Poe implements the OpenAI protocol, existing automation scripts require changing only two parameters:

import os
import openai

# Drop-in replacement for OpenAI client
client = openai.OpenAI(
    api_key=os.environ["POE_API_KEY"],
    base_url="https://api.poe.com/v1",
)

def query_frontier_model(model_handle: str, user_prompt: str) -> str:
    response = client.chat.completions.create(
        model=model_handle,
        messages=[
            {"role": "system", "content": "You are a senior software architect."},
            {"role": "user", "content": user_prompt},
        ],
        temperature=0.2,
    )
    return response.choices[0].message.content

if __name__ == "__main__":
    # Query Claude via Poe
    claude_result = query_frontier_model("Claude-Sonnet-4.6", "Review this async architecture pattern.")
    print("--- Claude Output ---\n", claude_result)

    # Query GPT-4o via the same client and key
    gpt_result = query_frontier_model("GPT-4o", "Generate a pytest suite for this pattern.")
    print("--- GPT Output ---\n", gpt_result)

Node.js / TypeScript Example

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.POE_API_KEY,
  baseURL: "https://api.poe.com/v1",
});

async function run() {
  const completion = await client.chat.completions.create({
    model: "Gemini-3.1-Pro",
    messages: [
      { role: "user", content: "Summarize recent ECMAScript stage 3 proposals." }
    ],
  });

  console.log(completion.choices[0]?.message?.content);
}

run();

Direct cURL Request

For shell scripts or CI/CD pipelines:

curl https://api.poe.com/v1/chat/completions \
  -H "Authorization: Bearer $POE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Claude-Sonnet-4.6",
    "messages": [
      {"role": "user", "content": "Explain the raft consensus algorithm in two sentences."}
    ],
    "stream": false
  }'

When to Use fastapi-poe vs. OpenAI Compatibility

While the OpenAI-compatible REST API handles 95% of editor and scripting needs, Poe also provides an official native Python library (fastapi-poe). Understanding their technical differences is essential:

FeatureOpenAI-Compatible (/v1)Native Poe SDK (fastapi-poe)
SDK RequiredStandard openai or HTTP clientpip install fastapi-poe
Tool IntegrationNative drop-in for Cursor, Cline, ContinueRequires custom wrapper code
Language SupportAny language (Python, Node, Go, Rust, cURL)Python only
Custom Bot ParametersNot supported (thinking_budget ignored)Full support via parameters dict
Native File UploadsLimited to standard vision URLsDirect binary upload via upload_file_sync
StreamingServer-Sent Events (SSE) standardAsync / sync generator streams

365Finds Recommendation: If you are configuring coding assistants or multi-language services, always use the OpenAI-compatible endpoint (https://api.poe.com/v1). Only switch to fastapi-poe when writing dedicated Python automation bots that need explicit parameter control (such as specifying explicit extended thinking token budgets or handling multi-megabyte binary attachments).


Practical Constraints and Best Practices

  1. Watch Agentic Point Burn: Autonomous tools like Cline execute multiple iterative calls (reading files, executing terminal commands, fixing linter errors). Running continuous agent loops against heavy models like Claude-Opus-4.7 will drain monthly points quickly. We recommend setting your default coding model to Claude-Sonnet-4.6 or GPT-4o for general coding, and routing quick script tasks to smaller variants.
  2. Private Bots Are Excluded: The OpenAI-compatible API only supports public bots. Proprietary server bots marked private or workspace internal bots cannot be accessed via /v1/chat/completions.
  3. No Native Prompt Caching: First-party provider APIs (such as Anthropic direct) offer 90% prompt caching discounts on large repetitive contexts. Poe's unified gateway charges compute points per standard model rate card without exposing direct prompt caching toggles to OpenAI SDK clients.

Final Verdict

For developers tired of juggling half a dozen API dashboards and pre-funding credit balances just to compare code generation across top LLMs, Poe’s OpenAI-compatible endpoint is an outstanding productivity multiplier. By pointing tools like Cline, Continue, or your Python automation scripts to https://api.poe.com/v1, you transform an existing Poe subscription into a flexible, multi-model developer backend with zero administrative friction.

References