doop (@doop2010)CPA授权文件批量转换成grok2api的授权文件 中发帖

晚上看到grok2api支持自动标记降智的账号,没找到将cpa_auth授权文件转换为grok2api授权文件的代码,临时用AI写了一个,一把过,分享给有需要的佬。 
批量转换 cpa_auth/ 下所有 xai-*.json,输出 JSONL(每行一个账号)
python3 cpa_to_grok2api.py --input-dir cpa_auth --output import.jsonl 
JSON 数组格式
python3 cpa_to_grok2api.py --input-dir cpa_auth --output import.json --format json 
grok2api 批量文档格式 {“provider”:“grok_build”,“accounts”:[…]}
python3 cpa_to_grok2api.py --input-dir cpa_auth...
 
 
Back to Top