API Endpoints

Credit count

Use this endpoint to check how many credits you have in your workspace

Endpoint

POST https://api.airscale.io/v1/credits

Headers

Key

Value

Required

Content-Type

application/json

Yes

Authorization

Bearer <YOUR_API_KEY>

Yes

Response

Successful Response (200)

{
  "status": "success",
  "credits": "12000"
}


Example Usage

cURL

curl -X POST "https://api.airscale.io/v1/credits" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Python

import requests

url = "https://api.airscale.io/v1/credits"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers, json={})
print(response.status_code, response.text)

JavaScript (Fetch)

const fetch = require('node-fetch');

const url = "https://api.airscale.io/v1/credits";

fetch(url, {
    method: "POST",
    headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    body: JSON.stringify({})
})
.then(res => res.text())
.then(text => console.log(text))
.catch(err => console.error(err));

PHP

<

GO

package main

import (
	"bytes"
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {
	url := "https://api.airscale.io/v1/credits"
	req, _ := http.NewRequest("POST", url, bytes.NewBuffer([]byte(`{}`)))
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(body))
}


On this page

© 2025

Airscale · All rights reserved