查询当前 API Key 关联账号的剩余解析额度,同时可用于验证 API Key 有效性
Python
import requests url = "https://somark.tech/api/v1/usage" data = { "api_key": "sk-***", } response = requests.post(url, data=data) print(response.json())
{ "code": 0, "message": "", "data": { "remaining_paid_pages": 104410, "remaining_free_pages_today": 295, "remaining_free_pages_this_month": 578, "dashboard_url": "https://somark.tech/workbench" } }
remaining_paid_pages
remaining_free_pages_today
remaining_free_pages_this_month
API 密钥,格式 sk-***
sk-***
"sk-***"
查询成功
状态码,0 为成功,非 0 见错误码
0
错误信息。成功时通常为空字符串。
""
当前 API Key 对应账号的剩余额度信息。
Show child attributes