[{"data":1,"prerenderedAt":108},["ShallowReactive",2],{"reference-detail-en-get_credits_api_v1_billing_credits_get":3,"developer-code-1ejay94":106,"developer-code-ta2jiy":107},{"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":93,"codeSamples":96},"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,63],{"status":24,"description":25,"contentType":26,"schema":27,"example":52,"examples":56,"headers":62},"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-specific payload. See this endpoint's response schema for its fields; null only when the operation returns no payload.",[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,"message":45,"server_time":55},{"remaining":54},1000,"2026-09-04T00:00:00Z",[57],{"name":45,"description":58,"summary":59,"value":60},"Examples illustrate the response structure, not live account data or a pricing quote. IDs and URLs are placeholders. Query model discovery and cost endpoints for current availability and prices.","Successful response",{"data":61,"message":45,"server_time":55},{"remaining":54},[],{"status":64,"description":65,"contentType":26,"schema":66,"example":89,"headers":92},"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":67,"description":29,"nullable":30,"properties":68},"ErrorResponse",[69],{"name":70,"required":18,"type":71,"description":29,"nullable":30,"properties":72},"error","ErrorDetail",[73,77,82,86],{"name":74,"required":18,"type":39,"description":75,"nullable":30,"properties":76},"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":78,"required":30,"type":79,"description":80,"nullable":18,"properties":81},"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":83,"required":30,"type":79,"description":84,"nullable":18,"properties":85},"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":87,"nullable":30,"properties":88},"Human-readable explanation of what went wrong. Safe to log or surface to end users; not localized.",[],{"error":90},{"code":91,"message":20,"details":20,"hint":20},1,[],[94],{"APIKeyHeader":95},[],[97,100,103],{"lang":98,"source":99},"SDK","from visionstory import VisionStoryClient\n\nclient = VisionStoryClient.from_env()\ncredits = client.get_credits()\nprint(credits)",{"lang":101,"source":102},"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":104,"source":105},"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>",1790231924517]