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

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

Description and use

The author demonstrates how to use a single OpenAI‑compatible endpoint (apishare.cc) to call four free LLM models by changing only the model string, avoiding code changes and providing instant per‑call cost visibility.

Problem

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

Outcome

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.

Workflow

  • 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

Evidence

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:

Source

One OpenAI-compatible endpoint + one key.

Source

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

Source

  • Record date: 2026-10-07T02:41:07.337Z