[{"data":1,"prerenderedAt":107},["ShallowReactive",2],{"reference-detail-zh-get_credits_api_v1_billing_credits_get":3,"developer-code-1ejay94":105,"developer-code-ta2jiy":106},{"tag":4,"sourceTag":4,"tagSlug":5,"method":6,"path":7,"slug":8,"summary":9,"description":10,"operationId":11,"groupOrder":12,"descriptionHtml":13,"parameters":14,"responses":22,"security":92,"codeSamples":95},"Billing","billing","GET","\u002Fapi\u002Fv1\u002Fbilling\u002Fcredits","get-credits","获取点数余额","返回账户当前可用的点数。每次生成会根据模型、分辨率和时长扣除点数。","get_credits_api_v1_billing_credits_get",50,"\u003Cp>返回账户当前可用的点数。每次生成会根据模型、分辨率和时长扣除点数。\u003C\u002Fp>",[15],{"name":16,"in":17,"required":18,"description":19,"type":20,"example":21},"X-API-Key","header",true,"你的 VisionStory API Key（`sk-vs-...`），请仅保存在服务端。可在 [API Key 管理](\u002Fapi-keys) 中创建或管理，需要 Pro 或更高方案。","string","sk-vs-your-api-key",[23,62],{"status":24,"description":25,"contentType":26,"schema":27,"example":52,"examples":56,"headers":61},"200","请求成功","application\u002Fjson",{"type":28,"description":29,"nullable":30,"properties":31},"BaseSuccessResponse_GetCreditsResponse_","",false,[32,42,47],{"name":33,"required":18,"type":34,"description":35,"nullable":18,"properties":36},"data","GetCreditsResponse | null","当前接口的响应数据，字段定义见该接口的响应结构。仅当操作不返回数据时为 null。",[37],{"name":38,"required":18,"type":39,"description":40,"nullable":30,"properties":41},"remaining","integer","账户当前可用的点数。每次生成会根据模型、分辨率和时长扣除点数。",[],{"name":43,"required":30,"type":20,"description":44,"nullable":30,"default":45,"properties":46},"message","便于阅读的状态消息；调用成功时为 `\"success\"`。","success",[],{"name":48,"required":18,"type":49,"description":50,"nullable":30,"properties":51},"server_time","string · date-time","服务端生成响应时的时间戳，使用 ISO 8601 格式（UTC）。",[],{"data":53,"message":45,"server_time":55},{"remaining":54},1000,"2026-09-04T00:00:00Z",[57],{"name":45,"description":58,"summary":25,"value":59},"示例仅用于说明响应结构，不代表实时账户数据或实际报价。ID 和 URL 均为占位内容。请调用模型查询及费用估算接口，获取当前可用模型和价格。",{"data":60,"message":45,"server_time":55},{"remaining":54},[],{"status":63,"description":64,"contentType":26,"schema":65,"example":88,"headers":91},"default","错误响应。所有失败均使用统一结构：`error` 对象包含数字错误码 `code`、便于阅读的 `message`、可选的 `details` 字符串，以及提供后续处理建议的可选 `hint`（便于 AI Agent 使用）。",{"type":66,"description":29,"nullable":30,"properties":67},"ErrorResponse",[68],{"name":69,"required":18,"type":70,"description":29,"nullable":30,"properties":71},"error","ErrorDetail",[72,76,81,85],{"name":73,"required":18,"type":39,"description":74,"nullable":30,"properties":75},"code","机器可读的错误码。传输层失败时对应 HTTP 状态码（例如 401、404、422、500），其他情况可能使用业务专用错误码。",[],{"name":77,"required":30,"type":78,"description":79,"nullable":18,"properties":80},"details","string | null","可选的结构化错误详情，例如 422 响应中逐字段校验错误的 JSON 字符串。无补充信息时不返回。",[],{"name":82,"required":30,"type":78,"description":83,"nullable":18,"properties":84},"hint","供用户和 AI Agent 参考的错误处理建议，例如如何修正请求或在哪里获取 API Key。可能不返回此字段。",[],{"name":43,"required":18,"type":20,"description":86,"nullable":30,"properties":87},"便于阅读的错误原因说明，可安全记录到日志或展示给最终用户；此返回值未本地化。",[],{"error":89},{"code":90,"message":20,"details":20,"hint":20},1,[],[93],{"APIKeyHeader":94},[],[96,99,102],{"lang":97,"source":98},"SDK","from visionstory import VisionStoryClient\n\nclient = VisionStoryClient.from_env()\ncredits = client.get_credits()\nprint(credits)",{"lang":100,"source":101},"REST","import os\nimport requests\n\nheaders = {\"X-API-Key\": os.environ[\"VISIONSTORY_API_KEY\"]}\nresponse = requests.get(\n    'https:\u002F\u002Fopenapi.visionstory.ai\u002Fapi\u002Fv1\u002Fbilling\u002Fcredits', headers=headers, timeout=10\n)\nresp_data = response.json()\nprint(resp_data['data']['remaining'])",{"lang":103,"source":104},"cURL","curl -X 'GET' \\\n      'https:\u002F\u002Fopenapi.visionstory.ai\u002Fapi\u002Fv1\u002Fbilling\u002Fcredits' \\\n      -H 'accept: application\u002Fjson' \\\n      -H 'X-API-Key: $VISIONSTORY_API_KEY'","\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#FF7B72\">from\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> visionstory \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">import\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> VisionStoryClient\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">client \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> VisionStoryClient.from_env()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79C0FF\">credits\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\"> =\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> client.get_credits()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79C0FF\">print\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">credits\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>","\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"data\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"remaining\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">1000\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">  },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"message\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"success\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"server_time\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"2026-09-04T00:00:00Z\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",1788547144493]