Fluxio
← Back to the blog

GLM-5.3 and Fluxio's relay service for live token streams

What tokens costEN

§1 Wiring the OpenAI Python SDK to Fluxio's relay service

Fluxio is built around replies that arrive token by token, and its OpenAI-style endpoint lets you keep the familiar OpenAI Python SDK while pointing it at a streaming-first relay service. The base address is https://api.fluxioapi.com/v1, so the setup is mostly a matter of swapping the base URL and adding your Fluxio key.

A compact script looks like this:

>>> from openai import OpenAI
>>> client = OpenAI(api_key=FLUXIO_API_KEY, base_url="https://api.fluxioapi.com/v1")
>>> stream = client.chat.completions.create(model="GLM-5.3", messages=[{"role": "user", "content": "Summarize this text."}], stream=True)

for chunk in stream: print(chunk.choices[0].delta.content or "", end="", flush=True)

That pattern also works for GPT, DeepSeek, Kimi, GLM, Grok, Qwen, Hunyuan, MiniMax and MiMo models from any OpenAI-format client, including Cursor, Cherry Studio, Cline, OpenCode, OpenAI SDKs and cURL. Codex runs GPT models on Fluxio. Claude models are different by design: they run only in the official Claude Code and Claude Desktop apps, version 2.1.285 or newer, and do not work in an SDK or in cURL. Gemini models run only through Gemini CLI on their native protocol, so they are not OpenAI-compatible and should not be placed in an OpenAI-format client.

  • – Use GLM-5.3, DeepSeek V4 Flash, Kimi K3, Grok 4.6, Grok 4.7, Qwen3.8 Max, Hunyuan 4, MiniMax M3, MiMo V2.6 Pro or a GPT model inside your OpenAI Python SDK.
  • – Keep Claude requests inside Claude Code or Claude Desktop, version 2.1.285 or newer.
  • – Keep Gemini requests inside Gemini CLI, where the native protocol is used.
  • – Remember that Fluxio bills each request on the tokens reported by the model, with input, output, cache write and cache read priced separately and no flat per-request fee.

§2 Streaming live tokens with GLM-5.3 and the rest of the SDK lineup

Streaming on Fluxio is the default shape of the experience rather than an extra layer. Replies arrive token by token over server-sent events on the OpenAI, Anthropic and Gemini protocols, and every stream reports its real usage. That matters when you are watching a top-up balance: you can see output forming in front of you and see the usage figures the request actually produced.

Two practical limits are worth planning around. Fluxio allows 120 requests a minute per key and 8 streams open at once per account. If your application fans out to many workers, keep the concurrent stream count under 8 and spread bursts across keys rather than assuming unlimited parallelism.

Because the SDK path is OpenAI-format, model choice is the main lever you control inside the same code. GLM-5.3 is priced at $0.5444 input and $1.63 output per 1M tokens, with cache read at $0.1361. GPT-6.1 Sol comes in at $0.1944 input and $0.9722 output per 1M tokens, with cache read at $0.0389. DeepSeek V4 Flash is $0.2875 input and $1.15 output, with cache read at $0.006944. MiMo V2.6 Pro is $0.2111 input and $0.4208 output, with cache read at $0.002778. MiniMax M3 is $0.1514 input and $0.6028 output, with cache read at $0.0306.

§3 Squeezing more from each top-up with a model-and-cache strategy

Fluxio charges by what actually flows through the models, so the most effective savings habit is choosing a model whose input and output rates fit the task, then reusing cached context where the model supports it. Cache reads are priced far below fresh input on many of these models, which makes repeated prompts with stable context a natural place to look for savings.

  • – For high-volume, short exchanges, MiMo V2.6 Pro at $0.2111 input and $0.4208 output per 1M tokens keeps both sides of a request inexpensive.
  • – For lightweight everyday work, MiniMax M3 at $0.1514 input and $0.6028 output per 1M tokens is another compact-priced option in the SDK lineup.
  • – For larger context reuse, note the cache read rates: MiMo V2.6 Pro at $0.002778, DeepSeek V4 Flash at $0.006944, MiniMax M3 at $0.0306, GPT-5.6 Sol at $0.0306 and GPT-6.1 Sol at $0.0389 per 1M tokens.
  • – Where cache writes are priced, they are separate line items: Gemini 2.5 Flash lists cache write at $0.2097 and cache read at $0.0208 per 1M tokens, while Gemini 3.1 Pro lists $1.44 and $0.1444, and Gemini 4 Argon lists $1.47 and $0.0736.
  • – For heavier reasoning, GLM-5.3 at $0.5444 input and $1.63 output, Kimi K3 at $1.22 input and $6.12 output, Qwen3.8 Max at $0.7528 input and $2.26 output, or Grok 4.6 at $0.5639 input and $1.69 output per 1M tokens give you room to compare against your actual usage log.

As an example, assume you send 100 messages a day, each with 1,000 input tokens and 200 output tokens. That is 100,000 input tokens and 20,000 output tokens per day. On MiniMax M3, the input side would run at about $0.01514 and the output side at about $0.012056, roughly $0.0272 per day, or about $0.82 across 30 days. On GLM-5.3, the same volume works out to about $0.05444 input and $0.0326 output, roughly $0.08704 per day, or about $2.61 across 30 days. These are examples based on the published per-1M-token rates, not quotes.

§4 Reading real usage and handling a dropped connection

Fluxio records each request in a usage log with its tokens and cost, and every stream reports its real usage, so the log is the place to confirm whether a model choice is paying off. The dashboard also shows usage across six interface languages: English, Chinese, Spanish, Hindi, Portuguese and French.

The dropped-connection rule is the part that keeps a streaming relay honest. If your client disconnects mid-stream, Fluxio still reads the reply to its end and bills the tokens actually used, nothing more, and it never adds a penalty. Tokens already generated are not refunded. That is why streaming-first design and usage-based billing fit together here: the tokens are real, the reported usage is real, and the cost follows the tokens rather than a flat request fee.

  • – Check the usage log after a batch of streaming calls to compare input, output, cache write and cache read costs per request.
  • – Treat a mid-stream disconnect as a billed event for the tokens already produced, since those tokens are not refunded.
  • – Keep open streams within the 8-stream account limit and requests within 120 a minute per key.
  • – Use the site contact page or the dashboard for messages; replies appear in the dashboard, and there is no support email.

§5 Top-ups, monthly plans and referral rebates on Fluxio

Fluxio's pay-per-token balance carries no monthly fee. Top-ups of $1.39, $6.94, $13.89, $27.78, $69.44 and $138.89 are available through Stripe Checkout, and every new account receives a $0.12 credit. Unused balance from a top-up can be refunded within 4 days of that top-up, minus what was consumed and payment fees, by asking through the message page.

For steadier usage, monthly plans are structured around official-dollar allowances. The Claude monthly plan is $62.36 for a $1100 allowance of official value over 30 days, at most $350 a week, and the larger Claude monthly plan is $165.14 for a $2900 allowance over 30 days, at most $850 a week. The GPT monthly plan is $59.58 for a $2600 allowance over 30 days, at most $800 a week, and the larger GPT monthly plan is $183.19 for a $8000 allowance over 30 days, at most $2400 a week. In each plan, each request draws its official-dollar value × 2.8, the plans cover Claude models only or GPT models only, and each comes with its own API key.

  • – Choose the Claude monthly plan when your work runs in Claude Code or Claude Desktop, version 2.1.285 or newer, since Claude models do not work in an SDK.
  • – Choose the GPT monthly plan when GPT models are your main traffic through the OpenAI Python SDK or Codex.
  • – Use pay-per-token top-ups for mixed-model workloads that include GLM-5.3, DeepSeek, Kimi, MiMo, MiniMax, Grok, Qwen or Hunyuan.
  • – Referral rebates pay 17% of what a directly invited friend pays and 5% for the next level, and rebates can move into the balance or be withdrawn from $12.50 by Alipay.
  • – For reference, the listed official prices behind some of these allowances include GPT-6.1 Sol at $2.00 input and $10.00 output per 1M tokens, GPT-6 Astra at $10.00 input and $50.00 output, and Claude Opus 5.5 at $4.00 input and $20.00 output per 1M tokens.

More from the current