跳转到主要内容
GET
/
api
/
openapi
/
balance
curl --request GET \
  --url 'https://aireiter.com/api/openapi/balance' \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://aireiter.com/api/openapi/balance"

headers = {
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
const url = "https://aireiter.com/api/openapi/balance";

const headers = {
  "Authorization": "Bearer <token>"
};

fetch(url, {
  method: "GET",
  headers: headers
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
package main

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

func main() {
    url := "https://aireiter.com/api/openapi/balance"

    req, _ := http.NewRequest("GET", url, nil)
    req.Header.Set("Authorization", "Bearer <token>")

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

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) {
        try {
            URL url = new URL("https://aireiter.com/api/openapi/balance");
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");
            conn.setRequestProperty("Authorization", "Bearer <token>");

            BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String line;
            StringBuilder response = new StringBuilder();
            while ((line = br.readLine()) != null) {
                response.append(line);
            }
            br.close();

            System.out.println(response.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
<?php

$url = "https://aireiter.com/api/openapi/balance";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Authorization: Bearer <token>"
));

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
require 'net/http'
require 'json'
require 'uri'

url = URI.parse("https://aireiter.com/api/openapi/balance")

http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url.path)
request["Authorization"] = "Bearer <token>"

response = http.request(request)
puts response.body
import Foundation

let url = URL(string: "https://aireiter.com/api/openapi/balance")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let error = error {
        print("Error: \(error)")
        return
    }

    if let data = data, let responseString = String(data: data, encoding: .utf8) {
        print(responseString)
    }
}

task.resume()
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        var url = "https://aireiter.com/api/openapi/balance";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
        var response = await client.GetAsync(url);
        var result = await response.Content.ReadAsStringAsync();

        Console.WriteLine(result);
    }
}
import 'dart:convert';
import 'package:http/http.dart' as http;

void main() async {
  final url = Uri.parse('https://aireiter.com/api/openapi/balance');

  final response = await http.get(
    url,
    headers: {
      'Authorization': 'Bearer <token>',
    },
  );

  print(response.body);
}
{
  "statusCode": 200,
  "message": "",
  "data": {
    "credits": 500,
    "free_quotas": [
      {
        "model_key": "nano_banana_v2",
        "total": 10,
        "used": 3,
        "remaining": 7
      }
    ]
  },
  "ok": true
}
{
  "statusCode": 401,
  "message": "Unauthorized",
  "ok": false
}
{
  "error": {
    "code": 500,
    "message": "服务器内部错误,请稍后重试"
  }
}

Authorizations

Authorization
string
必填
所有接口均需要使用Bearer Token进行认证获取 API Key:访问 API Key 管理页面 获取您的 API Key使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY

Response

statusCode
number
HTTP 状态码,200 表示成功
message
string
提示信息,成功时为空字符串
data
object
返回数据
ok
boolean
请求是否成功
curl --request GET \
  --url 'https://aireiter.com/api/openapi/balance' \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://aireiter.com/api/openapi/balance"

headers = {
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
const url = "https://aireiter.com/api/openapi/balance";

const headers = {
  "Authorization": "Bearer <token>"
};

fetch(url, {
  method: "GET",
  headers: headers
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
package main

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

func main() {
    url := "https://aireiter.com/api/openapi/balance"

    req, _ := http.NewRequest("GET", url, nil)
    req.Header.Set("Authorization", "Bearer <token>")

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

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) {
        try {
            URL url = new URL("https://aireiter.com/api/openapi/balance");
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");
            conn.setRequestProperty("Authorization", "Bearer <token>");

            BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String line;
            StringBuilder response = new StringBuilder();
            while ((line = br.readLine()) != null) {
                response.append(line);
            }
            br.close();

            System.out.println(response.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
<?php

$url = "https://aireiter.com/api/openapi/balance";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Authorization: Bearer <token>"
));

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
require 'net/http'
require 'json'
require 'uri'

url = URI.parse("https://aireiter.com/api/openapi/balance")

http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url.path)
request["Authorization"] = "Bearer <token>"

response = http.request(request)
puts response.body
import Foundation

let url = URL(string: "https://aireiter.com/api/openapi/balance")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let error = error {
        print("Error: \(error)")
        return
    }

    if let data = data, let responseString = String(data: data, encoding: .utf8) {
        print(responseString)
    }
}

task.resume()
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main(string[] args)
    {
        var url = "https://aireiter.com/api/openapi/balance";

        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
        var response = await client.GetAsync(url);
        var result = await response.Content.ReadAsStringAsync();

        Console.WriteLine(result);
    }
}
import 'dart:convert';
import 'package:http/http.dart' as http;

void main() async {
  final url = Uri.parse('https://aireiter.com/api/openapi/balance');

  final response = await http.get(
    url,
    headers: {
      'Authorization': 'Bearer <token>',
    },
  );

  print(response.body);
}
{
  "statusCode": 200,
  "message": "",
  "data": {
    "credits": 500,
    "free_quotas": [
      {
        "model_key": "nano_banana_v2",
        "total": 10,
        "used": 3,
        "remaining": 7
      }
    ]
  },
  "ok": true
}
{
  "statusCode": 401,
  "message": "Unauthorized",
  "ok": false
}
{
  "error": {
    "code": 500,
    "message": "服务器内部错误,请稍后重试"
  }
}