1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "items": [
10 { "topic": "中国电商" },
11 { "topic": "中国新能源汽车" },
12 { "topic": "中国人工智能" },
13 ],
14 "fieldsToUse": ["topic"],
15 "promptTemplate": "用两句话解释{{topic}}的常见商业场景。",
16 "responseMode": "text",
17 "deduplicate": True,
18 "maxItems": 3,
19 "baseUrl": "https://openrouter.ai/api/v1",
20 "model": "deepseek/deepseek-v4-flash",
21 "maxOutputTokens": 768,
22 "maxTotalTokens": 40000,
23 "temperature": 0.2,
24 "maxConcurrency": 1,
25}
26
27
28run = client.actor("zinin/chinese-llm-bulk-prompt-runner").call(run_input=run_input)
29
30
31print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
32for item in client.dataset(run.default_dataset_id).iterate_items():
33 print(item)
34
35