TTodAPI

Developers

Script automation and data cleaning

People often search for “a model for running scripts” or “which model is good for data cleaning.” A language model does not replace the runtime. Your Python process, cron job, or queue executes the work; the model can only see the text you send and return text (or, if both the catalog and your client support tool calling, suggest a tool call that your code then runs).

中文说明见 脚本自动化与数据清洗。This page does not claim a best model for automation.

When this setup fits — and when it does not

A workable pattern

  1. Write the job in your own environment (a script, a notebook, or a worker). Keep retries, logging, and file output there.
  2. Send the model the smallest useful text, with a strict instruction for the output shape (for example JSON keys you will parse).
  3. Validate the response in code. If parsing fails, retry or fall back; do not trust a single model reply as a cleaned database.
  4. For cleaning: start with a sample of rows, measure error rate yourself, then decide whether the rest of the pipeline should stay in deterministic code.
  5. If you want the model to “use tools,” confirm that the model ID on the plaza and your client both document tool or function calling. Otherwise, keep tools entirely in your script.

Minimal shape, using the OpenAI Python SDK and a placeholder model ID — replace the ID from the plaza, and keep the key in an environment variable:

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["TODAPI_KEY"], base_url="https://todapi.work/v1")

def rewrite_row(text: str) -> str:
    resp = client.chat.completions.create(
        model="YOUR_PLAZA_MODEL_ID",
        messages=[
            {"role": "system", "content": "Return only the cleaned text, no commentary."},
            {"role": "user", "content": text},
        ],
    )
    return resp.choices[0].message.content

How to start a billed call

  1. Create an account.
  2. Top up on the signed-in top-up page (the guide also mentions a redeem page; use the screen you see after login). You must top up before the first API call; signing up does not include free usage. This page does not publish a new minimum amount.
  3. Open API keys, create a key, and assign it to the group that includes the model you will call. Do not put the key in frontend code, screenshots, or a public repo. Do not share one secret among many people; create a separate key for each person or integration so you can revoke one key without rotating everyone else’s.
  4. Copy the exact model ID from the model plaza. Official aliases such as deepseek-flash are not claimed to work on TodAPI until that is verified against a signed-in model list.
  5. Call https://todapi.work/v1 with the OpenAI-compatible Chat Completions interface, as in the integration guide.

TodAPI bills a prepaid USD balance per token, with no subscription. Confirmed payment methods are WeChat Pay / Alipay for Asia-Pacific users, bank cards worldwide, and Web3 USDT. Available payment methods do not change the service region: this service is not offered to users in mainland China.

Public catalog prices (USD per 1M tokens)

The table is injected from the same anonymous public catalog as the model plaza. It is a display price, not your invoice, and it is not a claim that these are the lowest prices on the internet. If a refresh fails or an ID leaves the catalog, the table will not invent a $0 figure.

These are public catalog display prices from the same source as the model plaza, in USD per 1M tokens. As of . The catalog is refreshed at most about every five minutes. This is not your invoice: billed amounts follow the group bound to your API key, cache hit or miss, cache writes, and any peak window. The plaza can toggle a CNY view; this table publishes the USD billing unit only.

Model IDPublic groupGroup rateDiscounted input / 1MDiscounted output / 1MDiscounted cache read / 1MDiscounted cache write / 1MTime windows
deepseek-v4.1-flashDeepSeek0.168x$0.0252$0.1008$0.00252—Asia/Shanghai; weekdays only; 09:00–12:00 × 2 (effective 0.336x); 14:00–18:00 × 2 (effective 0.336x)
deepseek-v4.1-flash-1017DeepSeek0.168x$0.0252$0.1008$0.00252—Asia/Shanghai; weekdays only; 09:00–12:00 × 2 (effective 0.336x); 14:00–18:00 × 2 (effective 0.336x)
glm-5.3GLM0.18x$0.216$0.738$0.054—No time-of-day multiplier in this snapshot
glm-5.3-flashGLM0.18x$0.0252$0.0756$0.00594—No time-of-day multiplier in this snapshot

For a peak row, the effective rate is the group rate times the window multiplier, then rounded to thousandths, matching the plaza display. Requests that fall inside a window are shown at that effective rate. Whether official holidays are excluded is stated on the plaza; this table does not assume a holiday calendar.

Discounted price = public unit price × group rate, expressed per 1M tokens. This table keeps the significant decimals (for example 0.0252). The plaza may round the input/output columns to two decimal places. Compare official list prices only for the same model, window, cache outcome, and currency.

Worked examples below use a public plaza snapshot taken 2026-11-24 16:42 Asia/Singapore (UTC+8) for illustration only. Plug the current as-of row in the table above into the same formula before you budget. DeepSeek Flash in that snapshot: group rate 0.168, off-peak input $0.0252 / output $0.1008 per 1M tokens; weekday peak in Asia/Shanghai uses an effective rate of 0.336 (about $0.0504 / $0.2016). glm-5.3-flash after the 0.18 group rate: input $0.0252 / output $0.0756. Cache hits, a different key group, or a later catalog change will not match these numbers.

Formula (no cache): USD = calls × (input_tokens / 1,000,000 × input_price + output_tokens / 1,000,000 × output_price). Always include output tokens; an input-only comparison is incomplete.

Worked example (illustration only)

Assumptions: 200 script runs in an off-peak window, no cache hit, 2,000 input tokens and 400 output tokens each, using the 2026-11-24 16:42 snapshot of deepseek-v4.1-flash off-peak prices.

Per call: 2,000 / 1,000,000 × 0.0252 + 400 / 1,000,000 × 0.1008 = 0.0000504 + 0.00004032 = $0.00009072. For 200 calls: 200 × 0.00009072 = $0.018144.

If the same traffic ran inside a published DeepSeek peak window at the snapshot’s effective rate, both input and output roughly double, so the same 200 calls would be about $0.036288. If you instead used the snapshot’s glm-5.3-flash prices: 2,000 / 1,000,000 × 0.0252 + 400 / 1,000,000 × 0.0756 = $0.00008064 per call, or $0.016128 for 200 calls. These figures are not a ranking, not a monthly budget, and not a recommended top-up.

Questions this page will not answer with a slogan

Before you budget, confirm the current as-of rows on the DeepSeek API pricing page for Flash and Flash-1017 and the GLM API pricing page for glm-5.3 and glm-5.3-flash. Then follow the integration guide to create an account, top up, and make a call.

All use cases

Pick a different task guide.

DeepSeek Flash prices

Public catalog for Flash and Flash-1017, with as-of time.

GLM prices

Public catalog for glm-5.3 and glm-5.3-flash.

Point a client at the API

Work apps and phones: official app vs a custom endpoint.

Integration guide

Register, top up, create a key, then call.

Create an account

You must top up before the first call.