> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/rest-api-reference/openapi-reference/billing.md).

# Billing

Endpoints related to credits, credit balance, and credit purchases.

## Get credit balance and pricing

> Fetches the authenticated account's remaining credits, the account email the credentials belong to, and current credit purchase pricing. Confirm the account email before purchasing credits, since credits are non-transferable between accounts.

```json
{"openapi":"3.0.3","info":{"title":"Blotato API","version":"2.0.0"},"tags":[{"name":"billing","description":"Endpoints related to credits, credit balance, and credit purchases."}],"servers":[{"url":"https://backend.blotato.com","description":"Blotato API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"blotato-api-key","in":"header"}}},"paths":{"/v2/credits":{"get":{"summary":"Get credit balance and pricing","tags":["billing"],"description":"Fetches the authenticated account's remaining credits, the account email the credentials belong to, and current credit purchase pricing. Confirm the account email before purchasing credits, since credits are non-transferable between accounts.","responses":{"200":{"description":"Credit balance, the account email, and credit purchase pricing","content":{"application/json":{"schema":{"description":"Credit balance, the account email, and credit purchase pricing","type":"object","properties":{"creditsRemaining":{"type":"integer"},"accountEmail":{"type":"string"},"purchaseQuantityRange":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"}},"required":["min","max"]},"pricePer1000CreditsUsd":{"type":"number"}},"required":["creditsRemaining","accountEmail","purchaseQuantityRange","pricePer1000CreditsUsd"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"Unauthorized access","type":"string"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"Forbidden access","type":"string"},"subscriptionStatus":{"description":"Current subscription plan status","type":"string"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"number"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}}}}}}}
```

## Buy credits

> Creates a Stripe Checkout link the account owner opens in a browser to buy credits (quantity between 1000 and 10000). Creating a link never charges anything; payment happens only when a human completes checkout in the browser, and the purchased credits always land on this account.

```json
{"openapi":"3.0.3","info":{"title":"Blotato API","version":"2.0.0"},"tags":[{"name":"billing","description":"Endpoints related to credits, credit balance, and credit purchases."}],"servers":[{"url":"https://backend.blotato.com","description":"Blotato API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"blotato-api-key","in":"header"}}},"paths":{"/v2/credits":{"post":{"summary":"Buy credits","tags":["billing"],"description":"Creates a Stripe Checkout link the account owner opens in a browser to buy credits (quantity between 1000 and 10000). Creating a link never charges anything; payment happens only when a human completes checkout in the browser, and the purchased credits always land on this account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"minimum":1000,"maximum":10000,"type":"integer"},"referral":{"type":"string","nullable":true}},"required":["quantity"]}}}},"responses":{"201":{"description":"A Stripe Checkout link to buy credits.","content":{"application/json":{"schema":{"description":"A Stripe Checkout link to buy credits.","type":"object","properties":{"checkoutUrl":{"description":"Stripe Checkout URL. The account owner opens this in a browser to complete payment. No charge occurs until checkout is completed.","type":"string"}},"required":["checkoutUrl"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"number"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"Unauthorized access","type":"string"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"description":"Forbidden","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"Forbidden access","type":"string"},"subscriptionStatus":{"description":"Current subscription plan status","type":"string"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"Rate limit exceeded","type":"string"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"number"},"action":{"description":"Action to take to resolve the error","type":"string"},"details":{"description":"Additional structured details about the error","type":"object","additionalProperties":{}}},"required":["message"]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.blotato.com/rest-api-reference/openapi-reference/billing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
