678APIdocs
https://www.678api.com/v1
Tools

OpenAI-compatible integration

Most clients that support a custom OpenAI Base URL can use 678API directly.

General configuration

Base URLhttps://www.678api.com/v1
API KeyYOUR_API_KEY
Chat Endpoint/chat/completions

Node.js example

text
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.API678_API_KEY,
baseURL: "https://www.678api.com/v1",
defaultHeaders: { "User-Agent": "678API-Node/1.0" },
});

const res = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Hello 678API" }],
});

Python example

text
from openai import OpenAI

client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://www.678api.com/v1",
default_headers={"User-Agent": "678API-Python/1.0"},
)

resp = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello 678API"}],
)

print(resp.choices[0].message.content)
If you see Your request was blocked

The request was blocked by an edge security rule, not by Python syntax. Keep the custom User-Agent shown in the example. The Python SDK uses default_headers, while the Node.js SDK uses defaultHeaders.

© 2026 678API · AI API Gateway Documentation