Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How to Call 4 Free LLM Models from One OpenAI-Compatible Endpoint (Tested October 2026)

说明与用途

作者展示了如何使用单一的 OpenAI 兼容端点(apishare.cc)调用四个免费 LLM 模型,仅通过更改模型字符串即可,无需修改代码,并即时显示调用成本。

问题

Free LLM APIs frequently become unavailable or degrade, forcing developers to re‑integrate code for each provider.

结果

The setup allows developers to switch between four free LLM models—qwen3.8-max, Hunyuan-MT-7B, GLM-Z1-9B, and agnes-3.0-flash—by changing only the model string, with zero code changes and immediate per‑call cost visibility.

工作流

  • Obtain an API key from apishare.cc
  • Set the key in the environment (e.g., export APISHARE_KEY="your-key-here")
  • Choose a model ID for the task (e.g., ApiShare/alibaba/qwen3.8-max:free for general chat)
  • Send a POST request to https://apishare.cc/v1/chat/completions with the chosen model and messages
  • Use the response, which includes an apishare_usage block with per‑call cost

证据

Grab a key from apishare.cc. The gateway speaks the standard /v1/chat/completions protocol, so if your code already talks to OpenAI, zero code changes are needed:

来源

One OpenAI-compatible endpoint + one key.

来源

The billing answer nobody gives you: per-call cost in the response

来源

  • 记录日期: 2026-10-07T02:41:07.337Z