List available models
curl --request GET \
--url https://api.flex.ai/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flex.ai/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.flex.ai/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.flex.ai/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.flex.ai/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.flex.ai/v1/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flex.ai/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{
"object": "list",
"data": [
{
"id": "<string>",
"object": "model",
"created": 123,
"owned_by": "flexai",
"hugging_face_id": "<string>",
"aliases": [
"<string>"
],
"name": "<string>",
"input_modalities": [],
"output_modalities": [],
"context_length": 123,
"max_output_length": 123,
"pricing": {
"prompt": "<string>",
"completion": "<string>",
"request": "<string>",
"image": "<string>",
"web_search": "<string>",
"internal_reasoning": "<string>"
},
"supported_features": [],
"supported_sampling_parameters": [
"<string>"
]
}
]
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "<string>",
"doc_url": "<string>"
}
}Models
List available models
Returns text, chat, and embedding models in OpenAI’s Model shape —
see the model catalog for the
complete set with pricing and capabilities.
Each entry is enriched with OpenRouter-spec metadata so
third-party catalog ingesters can consume /v1/models directly.
The OpenAI-compatible top-level keys (id, object, created,
owned_by) stay byte-identical for back-compat with the OpenAI Python
SDK. owned_by is always "flexai" — clients branching on the legacy
"openai" placeholder must update.
GET
/
v1
/
models
List available models
curl --request GET \
--url https://api.flex.ai/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flex.ai/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.flex.ai/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.flex.ai/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.flex.ai/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.flex.ai/v1/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flex.ai/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{
"object": "list",
"data": [
{
"id": "<string>",
"object": "model",
"created": 123,
"owned_by": "flexai",
"hugging_face_id": "<string>",
"aliases": [
"<string>"
],
"name": "<string>",
"input_modalities": [],
"output_modalities": [],
"context_length": 123,
"max_output_length": 123,
"pricing": {
"prompt": "<string>",
"completion": "<string>",
"request": "<string>",
"image": "<string>",
"web_search": "<string>",
"internal_reasoning": "<string>"
},
"supported_features": [],
"supported_sampling_parameters": [
"<string>"
]
}
]
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"code": "<string>",
"doc_url": "<string>"
}
}Authorizations
Virtual API key. Create one from the
FlexAI dashboard. Pass as
Authorization: Bearer sk-xxxx.
Was this page helpful?
⌘I