[{"data":1,"prerenderedAt":96},["ShallowReactive",2],{"reference-detail-get_credits_api_v1_billing_credits_get":3,"developer-code-155jxz2":94,"developer-code-xsxrub":95},{"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":84,"codeSamples":87},"Billing","billing","GET","\u002Fapi\u002Fv1\u002Fbilling\u002Fcredits","get-credits","Get credit balance","Return the credits currently available on your account. Every generation deducts credits based on\nthe model, resolution, and duration.","get_credits_api_v1_billing_credits_get",50,"\u003Cp>Return the credits currently available on your account. Every generation deducts credits based on the model, resolution, and duration.\u003C\u002Fp>",[15],{"name":16,"in":17,"required":18,"description":19,"type":20,"example":21},"X-API-Key","header",true,"Your VisionStory API key (`sk-vs-...`), kept server-side. Create or manage keys in [API keys](\u002Fapi-keys) (Pro plan and up).","string","sk-vs-your-api-key",[23,56],{"status":24,"description":25,"contentType":26,"schema":27,"example":52},"200","Successful Response","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","The endpoint payload. Its shape is specific to each endpoint (see that endpoint's response schema); null for operations that return no body, such as delete.",[37],{"name":38,"required":18,"type":39,"description":40,"nullable":30,"properties":41},"remaining","integer","Credits currently available on the account. Each generation deducts credits based on model, resolution, and duration.",[],{"name":43,"required":30,"type":20,"description":44,"nullable":30,"default":45,"properties":46},"message","Human-readable status message; `\"success\"` on a successful call.","success",[],{"name":48,"required":18,"type":49,"description":50,"nullable":30,"properties":51},"server_time","string · date-time","Server-side timestamp when the response was produced, in ISO 8601 format (UTC).",[],{"data":53,"server_time":55,"message":45},{"remaining":54},1,"2026-08-24T08:00:00Z",{"status":57,"description":58,"contentType":26,"schema":59,"example":82},"default","Error response. All failures share one envelope: an `error` object with a numeric `code`, a human-readable `message`, an optional `details` string, and an optional `hint` giving an actionable next step (useful for AI agents).",{"type":60,"description":29,"nullable":30,"properties":61},"ErrorResponse",[62],{"name":63,"required":18,"type":64,"description":29,"nullable":30,"properties":65},"error","ErrorDetail",[66,70,75,79],{"name":67,"required":18,"type":39,"description":68,"nullable":30,"properties":69},"code","Machine-readable error code. Mirrors the HTTP status for transport-level failures (e.g. 401, 404, 422, 500) and may carry a business-specific code otherwise.",[],{"name":71,"required":30,"type":72,"description":73,"nullable":18,"properties":74},"details","string | null","Optional structured detail about the failure, e.g. a JSON string of per-field validation errors on a 422. Absent when there is nothing extra to report.",[],{"name":76,"required":30,"type":72,"description":77,"nullable":18,"properties":78},"hint","Actionable next step for resolving the error, written for both humans and AI agents (e.g. how to fix the request, or where to obtain an API key). May be absent.",[],{"name":43,"required":18,"type":20,"description":80,"nullable":30,"properties":81},"Human-readable explanation of what went wrong. Safe to log or surface to end users; not localized.",[],{"error":83},{"code":54,"message":20,"details":20,"hint":20},[85],{"APIKeyHeader":86},[],[88,91],{"lang":89,"source":90},"Python","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":92,"source":93},"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\">import\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> os\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#FF7B72\">import\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> requests\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">headers \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> {\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"X-API-Key\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: os.environ[\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"VISIONSTORY_API_KEY\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">]}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">response \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> requests.get(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#A5D6FF\">    'https:\u002F\u002Fopenapi.visionstory.ai\u002Fapi\u002Fv1\u002Fbilling\u002Fcredits'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">, \u003C\u002Fspan>\u003Cspan style=\"color:#FFA657\">headers\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">headers, \u003C\u002Fspan>\u003Cspan style=\"color:#FFA657\">timeout\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">10\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">resp_data \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> response.json()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79C0FF\">print\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(resp_data[\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'data'\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">][\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">'remaining'\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\">1\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\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-08-24T08:00:00Z\"\u003C\u002Fspan>\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>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",1788166855865]