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
- Fits. Batch rewrite, classification, or extraction of text you already have: log lines, product titles, short table cells, draft emails that a script will later send through your own mailer.
- Does not fit by itself. Starting a program, talking to a database, moving files, or guaranteeing a clean production dataset. Those steps stay in your code and your validators.
- Data you should not send. Do not paste secrets, payment details, or other unnecessary personal data into prompts. TodAPI is a model gateway, not a customer-data platform we are asking you to store information in.
A workable pattern
- Write the job in your own environment (a script, a notebook, or a worker). Keep retries, logging, and file output there.
- Send the model the smallest useful text, with a strict instruction for the output shape (for example JSON keys you will parse).
- Validate the response in code. If parsing fails, retry or fall back; do not trust a single model reply as a cleaned database.
- 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.
- 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
- Create an account.
- 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.
- 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.
- Copy the exact model ID from the model plaza. Official aliases such as
deepseek-flashare not claimed to work on TodAPI until that is verified against a signed-in model list. - Call
https://todapi.work/v1with 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.
| Model ID | Public group | Group rate | Discounted input / 1M | Discounted output / 1M | Discounted cache read / 1M | Discounted cache write / 1M | Time windows |
|---|---|---|---|---|---|---|---|
deepseek-v4.1-flash | DeepSeek | 0.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-1017 | DeepSeek | 0.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.3 | GLM | 0.18x | $0.216 | $0.738 | $0.054 | — | No time-of-day multiplier in this snapshot |
glm-5.3-flash | GLM | 0.18x | $0.0252 | $0.0756 | $0.00594 | — | No time-of-day multiplier in this snapshot |
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
- There is no “script-specialist” model on TodAPI, and no unpublished benchmark that would let us say which ID is best for automation.
- Token cost is only the API line. Engineering time, compute for your runtime, and failed-retry traffic are extra.
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.