curl --request GET \
--url 'https://toapis.com/v1/models' \
--header 'Authorization: Bearer <token>'
curl --request GET \
--url 'https://toapis.com/v1/models?type=all' \
--header 'Authorization: Bearer <token>'
import requests
API_BASE = 'https://toapis.com'
API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx'
headers = {
'Authorization': f'Bearer {API_KEY}'
}
response = requests.get(f'{API_BASE}/v1/models', headers=headers)
data = response.json()
if data.get('success'):
for model in data.get('data', []):
print(model['id'])
else:
print(data)
const API_BASE = 'https://toapis.com';
const API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx';
async function listModels(type = 'text') {
const url = new URL('/v1/models', API_BASE);
if (type) url.searchParams.set('type', type);
const response = await fetch(url, {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
});
const data = await response.json();
console.log(data.data?.map((model) => model.id));
return data;
}
listModels('all');
{
"success": true,
"object": "list",
"data": [
{
"id": "claude-sonnet-4-6",
"object": "model",
"created": 1626777600,
"owned_by": "anthropic",
"supported_endpoint_types": ["chat_completions", "responses"]
},
{
"id": "gpt-5",
"object": "model",
"created": 1626777600,
"owned_by": "openai",
"supported_endpoint_types": ["chat_completions"]
}
]
}
채팅 API
List 모델
List models available to the current API key, compatible with the OpenAI 모델 API
GET
/
v1
/
models
curl --request GET \
--url 'https://toapis.com/v1/models' \
--header 'Authorization: Bearer <token>'
curl --request GET \
--url 'https://toapis.com/v1/models?type=all' \
--header 'Authorization: Bearer <token>'
import requests
API_BASE = 'https://toapis.com'
API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx'
headers = {
'Authorization': f'Bearer {API_KEY}'
}
response = requests.get(f'{API_BASE}/v1/models', headers=headers)
data = response.json()
if data.get('success'):
for model in data.get('data', []):
print(model['id'])
else:
print(data)
const API_BASE = 'https://toapis.com';
const API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx';
async function listModels(type = 'text') {
const url = new URL('/v1/models', API_BASE);
if (type) url.searchParams.set('type', type);
const response = await fetch(url, {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
});
const data = await response.json();
console.log(data.data?.map((model) => model.id));
return data;
}
listModels('all');
{
"success": true,
"object": "list",
"data": [
{
"id": "claude-sonnet-4-6",
"object": "model",
"created": 1626777600,
"owned_by": "anthropic",
"supported_endpoint_types": ["chat_completions", "responses"]
},
{
"id": "gpt-5",
"object": "model",
"created": 1626777600,
"owned_by": "openai",
"supported_endpoint_types": ["chat_completions"]
}
]
}
중국 본토 사용자 안내: 중국 본토 사용자는
https://toapis.cn 를 API 엔드포인트(Base URL)로 사용해 주세요. 본 문서의 예시에서 https://toapis.com 을 https://toapis.cn 로 바꿔 주세요.- Compatible with the OpenAI 모델 API format
- Returns models available to the current API key and user group
- Returns text models by default; use
type=allto include all model types - Supports filtering by text, image, video, or audio models
Authorizations
string
필수
All API requests require Bearer Token authentication.Get your API key from the API Key management page.Add it to the request header:
Authorization: Bearer YOUR_API_KEY
Query 파라미터
string
기본값:"text"
Filters models by type.Supported values:
textorchat: return text/chat models onlyimage: return image models onlyvideo: return video models onlyaudio: return audio models onlyall: return all available models
응답
boolean
Whether the request succeeded.
string
List object type. Always
list.object[]
The list of models.
표시 data[n]
표시 data[n]
string
모델 ID. Use this value as the
model parameter in other API requests.string
Object type. Always
model.integer
모델 creation timestamp. Some custom models may return the platform default timestamp.
string
모델 owner, provider, or channel name.
string[]
엔드포인트 types supported by the model. Different models may support Chat Completions, 응답s, image, video, or other endpoints.
curl --request GET \
--url 'https://toapis.com/v1/models' \
--header 'Authorization: Bearer <token>'
curl --request GET \
--url 'https://toapis.com/v1/models?type=all' \
--header 'Authorization: Bearer <token>'
import requests
API_BASE = 'https://toapis.com'
API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx'
headers = {
'Authorization': f'Bearer {API_KEY}'
}
response = requests.get(f'{API_BASE}/v1/models', headers=headers)
data = response.json()
if data.get('success'):
for model in data.get('data', []):
print(model['id'])
else:
print(data)
const API_BASE = 'https://toapis.com';
const API_KEY = 'sk-xxxxxxxxxxxxxxxxxxxxxx';
async function listModels(type = 'text') {
const url = new URL('/v1/models', API_BASE);
if (type) url.searchParams.set('type', type);
const response = await fetch(url, {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
});
const data = await response.json();
console.log(data.data?.map((model) => model.id));
return data;
}
listModels('all');
{
"success": true,
"object": "list",
"data": [
{
"id": "claude-sonnet-4-6",
"object": "model",
"created": 1626777600,
"owned_by": "anthropic",
"supported_endpoint_types": ["chat_completions", "responses"]
},
{
"id": "gpt-5",
"object": "model",
"created": 1626777600,
"owned_by": "openai",
"supported_endpoint_types": ["chat_completions"]
}
]
}
Notes
- If the API key has model restrictions, only allowed models are returned.
- If
typeis omitted, async task models such as video and audio models are excluded from the default result. - To retrieve image, video, audio, and text models together, call
GET /v1/models?type=all.