List models
curl --request GET \
--url https://api.aisa.one/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/v1/models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/v1/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/v1/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"aisa": {
"capabilities": [
"<string>"
],
"display_name": "<string>",
"model_type": "<string>",
"routes": [
{
"key": "<string>",
"method": "<string>",
"path": "<string>",
"preferred": true
}
],
"preferred_route": "<string>"
},
"created": 123,
"id": "<string>",
"object": "model",
"owned_by": "<string>",
"recharge_required": true
}
],
"object": "list"
}Media Generation
List models
Lists the models this API key can call, with each model's type and the routes it serves. Use the id as the model field of the route a model lists, for example an image model with POST /v1/images/generations. Filter by model_type to list only image or video models.
<!-- aisa-pricing:start -->
当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。
<!-- aisa-pricing:end -->
GET
https://api.aisa.one
/
v1
/
models
List models
curl --request GET \
--url https://api.aisa.one/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/v1/models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/v1/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/v1/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"aisa": {
"capabilities": [
"<string>"
],
"display_name": "<string>",
"model_type": "<string>",
"routes": [
{
"key": "<string>",
"method": "<string>",
"path": "<string>",
"preferred": true
}
],
"preferred_route": "<string>"
},
"created": 123,
"id": "<string>",
"object": "model",
"owned_by": "<string>",
"recharge_required": true
}
],
"object": "list"
}请求规范
- 方法与路径: GET /v1/models
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/v1/models - model_type: query; 可选
- Runtime 事实版本: 91bf641454e0de177731cf163176d280d129e69966cbcc50fec1085b586240bc
{
"operationId": "listModels",
"method": "GET",
"path": "/v1/models",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Comma-separated model types to include: text, image, video, embedding. Omitted lists every model.",
"example": "image,video",
"in": "query",
"name": "model_type",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"description": "Reading the model catalog is free.",
"kind": "no_customer_charge"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
Comma-separated model types to include: text, image, video, embedding. Omitted lists every model.