Skip to content

coding67api/examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coding67-examples

Minimal, runnable code examples for coding67.com — a unified LLM API gateway that speaks OpenAI-compatible protocol and routes to Claude, GPT, and Gemini behind a single API key.

中文说明见下方 / Chinese version below.


What this repo is for

This repo contains the smallest possible runnable examples showing how to call Claude / GPT / Gemini through a single OpenAI-compatible endpoint.

Every file:

  • Is under 30 lines
  • Runs as-is after you set CODING67_API_KEY
  • Uses only official SDKs (openai, langchain-openai) — nothing exotic
  • Demonstrates one specific thing (minimal call, streaming, multi-model, tool calling)

What this repo is not for

coding67 is a gateway for API integration — you writing backend code that calls LLMs. It is not a way to point desktop developer tools like Claude Code, Codex CLI, or Cursor at a custom endpoint. That usage pattern is out of scope and unsupported; no examples here use that pattern.

Get an API key

  1. Sign up with email at coding67.com/login (no credit card needed for the free tier — 50 lifetime requests is enough to run every example in this repo).

  2. Create an API key in the dashboard. It looks like sk-proxy-<name>-<random>.

  3. Export it:

    export CODING67_API_KEY="sk-proxy-yourname-xxxxxx"

Run the examples

Python

cd python
pip install -r requirements.txt
python 01_minimal.py
  • 01_minimal.py — one request, one response
  • 02_streaming.py — SSE streaming with stream=True
  • 03_multi_model.py — same prompt, three models (Claude / GPT / Gemini)
  • 04_langchain.py — LangChain ChatOpenAI pointed at the gateway

Node.js

cd node
npm install
node 01_minimal.mjs
  • 01_minimal.mjs — minimal chat completion
  • 02_streaming.mjs — SSE streaming with for await
  • 03_multi_model.mjs — loop over three models with one client

curl

cd curl
./chat.sh

Minimal-dependency smoke test for CI or cron.

Supported models

Model Provider Good for
claude-opus-4-6 Anthropic Complex reasoning, long-form writing
claude-sonnet-4-6 Anthropic Default for most tasks
claude-haiku-4-5 Anthropic Fast classification and extraction
gpt-5.4 OpenAI General + strong tool calling
gpt-5.3-codex OpenAI Code generation
gpt-5.4-mini OpenAI Cheap general-purpose
gemini-3.1-pro Google Long context, multimodal
gemini-3-flash Google Fast / batch

Beyond this list, the gateway also does keyword-based routing: any model name containing claude / gemini / gpt- / o1- / o3- / o4- is routed to the matching provider with the name passed through. So legacy names like gpt-4o-mini or claude-3-5-sonnet keep working.

FAQ

Does this support /v1/messages (Anthropic native format)? Yes — point the Anthropic Python SDK at https://api.coding67.com with your sk-proxy-... key in the x-api-key header. But for most users the OpenAI-compatible path in the examples here is simpler.

Does streaming work? Yes, stream=True is fully supported over SSE. See python/02_streaming.py.

Are there rate limits? Yes — per plan. Free is 50 lifetime requests; paid plans start at ¥150/month with generous daily quotas. See coding67.com/#pricing.

Can I use this from China without a proxy? Yes — the gateway is hosted in AWS Singapore (ap-southeast-1) which is the main reason the service exists. No VPN, no self-hosted proxy needed on your end.

License

MIT.


coding67-examples(中文)

coding67.com 的最小可运行代码示例 —— 一个兼容 OpenAI 协议的统一大模型 API 网关,一个 API Key 调用 Claude、GPT、Gemini。

这个仓库是干什么的

这里只放最小可运行示例。每个文件:

  • 不超过 30 行
  • 设置 CODING67_API_KEY 后即可直接运行
  • 只用官方 SDK(openailangchain-openai)
  • 每个文件只演示一件事

这个仓库不是干什么的

coding67 面向后端 API 集成场景 —— 你写的 Python / Node 代码调用大模型。 它不是用来把 Claude Code、Codex CLI、Cursor 等桌面工具指向自定义 endpoint 的 方案。那种使用方式不在支持范围内,本仓库也没有相关示例。

获取 API Key

  1. coding67.com/login 用邮箱注册,免费套餐不 需要信用卡(50 次免费调用够你跑完本仓库的全部示例)

  2. 在 dashboard 创建 API Key,形如 sk-proxy-<name>-<random>

  3. 导出环境变量:

    export CODING67_API_KEY="sk-proxy-yourname-xxxxxx"

运行示例

Python

cd python
pip install -r requirements.txt
python 01_minimal.py

Node.js

cd node
npm install
node 01_minimal.mjs

curl

cd curl
./chat.sh

价格

套餐 价格
Free 免费 — 50 次生命周期调用
Basic ¥150 / 月
Pro ¥299 / 月
Pro Plus ¥569 / 月
Pro Max ¥1299 / 月

详细额度见 coding67.com/#pricing

License

MIT.

About

Minimal runnable examples for coding67.com — unified LLM API gateway (Claude / GPT / Gemini)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors