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.
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"
}Request contract
- Method and path: GET /v1/models
- Availability: enabled
- Request URL template:
https://api.aisa.one/v1/models - model_type: query; optional
{
"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",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}