列出模型
curl --request GET \
--url https://api.ppio.com/openai/v1/models \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.ppio.com/openai/v1/models"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.ppio.com/openai/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.ppio.com/openai/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: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.ppio.com/openai/v1/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.ppio.com/openai/v1/models")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/openai/v1/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"created": 123,
"object": "<string>",
"owned_by": "<string>",
"permission": null,
"root": "<string>",
"parent": "<string>",
"title": "<string>",
"display_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"model_type": "<string>",
"status": 123,
"context_size": 123,
"max_output_tokens": 123,
"min_output_tokens": 123,
"features": [
"<string>"
],
"endpoints": [
"<string>"
],
"input_modalities": [
"<string>"
],
"output_modalities": [
"<string>"
],
"input_token_price_per_m": 123,
"output_token_price_per_m": 123,
"pricing": {
"prompt": {},
"completion": {},
"input_cache_read": {},
"input_cache_write": {},
"input_cache_write_1h": {},
"multimodal_input": [
{}
],
"multimodal_output": [
{}
]
},
"is_tiered_billing": true,
"tiered_billing_configs": [
{
"min_tokens": 123,
"max_tokens": 123,
"output_min_tokens": 123,
"output_max_tokens": 123,
"pricing": {}
}
]
}
]
}大语言
列出模型
了解 PPIO 模型列表接口的使用方式,查阅如何获取模型信息,为应用准备模型选择与请求配置提供接入参考。
GET
/
openai
/
v1
/
models
列出模型
curl --request GET \
--url https://api.ppio.com/openai/v1/models \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.ppio.com/openai/v1/models"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.ppio.com/openai/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.ppio.com/openai/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: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.ppio.com/openai/v1/models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.ppio.com/openai/v1/models")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/openai/v1/models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"created": 123,
"object": "<string>",
"owned_by": "<string>",
"permission": null,
"root": "<string>",
"parent": "<string>",
"title": "<string>",
"display_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"model_type": "<string>",
"status": 123,
"context_size": 123,
"max_output_tokens": 123,
"min_output_tokens": 123,
"features": [
"<string>"
],
"endpoints": [
"<string>"
],
"input_modalities": [
"<string>"
],
"output_modalities": [
"<string>"
],
"input_token_price_per_m": 123,
"output_token_price_per_m": 123,
"pricing": {
"prompt": {},
"completion": {},
"input_cache_read": {},
"input_cache_write": {},
"input_cache_write_1h": {},
"multimodal_input": [
{}
],
"multimodal_output": [
{}
]
},
"is_tiered_billing": true,
"tiered_billing_configs": [
{
"min_tokens": 123,
"max_tokens": 123,
"output_min_tokens": 123,
"output_max_tokens": 123,
"pricing": {}
}
]
}
]
}列出当前可用的 LLM 模型,并提供每个模型的基本信息。
该 Endpoint 与 OpenAI API 兼容。
请求头
string
必填
枚举值:application/json。
string
必填
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
响应参数
object[]
必填
包含以下属性的模型对象的数组。字段含义与检索模型接口返回的模型对象一致。
显示 properties
显示 properties
string
必填
模型 ID ,用于标识模型。可以在 API Endpoints 中引用。
integer
必填
模型创建时的 Unix 时间戳(以秒为单位)。
string
必填
对象类型。取值固定为 model 。
string
必填
模型所属方。取值固定为 ppio 。
null
必填
OpenAI 兼容字段,固定返回 null 。
string
必填
OpenAI 兼容字段,固定返回空字符串。
string
必填
OpenAI 兼容字段,固定返回空字符串。
string
必填
模型名称,与 id 相同。
string
必填
模型展示名称,例如 GLM 5.1 。
string
必填
模型描述。
string[]
必填
模型标签列表,没有标签时为空数组。
string
必填
模型类型,取值为 chat 。
integer
必填
模型状态。1 表示可用,3 表示待上线,4 表示已下架。
integer
必填
模型允许的最大上下文长度。
integer
模型单次请求允许输出的最大 Token 数。
integer
模型单次请求要求输出的最小 Token 数。仅配置了该限制的模型返回。
string[]
模型支持的能力标识,取值为 function-calling 、structured-outputs 、reasoning 、serverless 。没有能力标识的模型不返回该字段。
string[]
必填
模型支持的 Endpoint,取值为 chat/completions 、completions 、responses 、anthropic 。
string[]
必填
模型支持的输入模态,取值为 text 、image 、video 、audio 。
string[]
必填
模型支持的输出模态,取值为 text 、audio 。
integer
必填
输入价格(每百万 Token)。单位为万分之一元,例如 60000 表示 6 元。已包含当前生效的折扣,与 pricing.prompt.price_per_m 相同;不返回 pricing 的模型该值为 0。
integer
必填
输出价格(每百万 Token)。单位为万分之一元。已包含当前生效的折扣,与 pricing.completion.price_per_m 相同;不返回 pricing 的模型该值为 0。
object
按计费项拆分的价格,每个计费项同时给出目录价和折后价。没有价格的模型不返回该字段。每个计费项都包含以下 4 个字段:
- origin_price_per_m:目录价(每百万 Token),单位为万分之一元。
- price_per_m:当前生效折扣后的价格(每百万 Token),单位为万分之一元。没有折扣时与 origin_price_per_m 相同。
- origin_price_per_m_decimal:目录价(每百万 Token),单位为元,以字符串返回。
- price_per_m_decimal:折后价(每百万 Token),单位为元,以字符串返回。
显示 properties
显示 properties
object
必填
输入 Token 价格。
object
必填
输出 Token 价格。
object
缓存读取价格,即命中 Prompt Cache 的输入 Token 价格。仅支持 Prompt Cache 的模型返回。
object
缓存写入价格,即写入 Prompt Cache 的输入 Token 价格。仅缓存写入单独计费的模型返回。
object
缓存有效期为 1 小时时的缓存写入价格。仅支持 1 小时缓存的模型返回。
object[]
按输入模态拆分的输入价格,仅按模态分别计价的模型返回。每项包含 modals(模态列表,例如 [“image”])、input_token_base_price(目录价)和 input_token_discount_price(折后价),价格为每百万 Token,单位为万分之一元。
object[]
按输出模态拆分的输出价格,仅按模态分别计价且有非文本输出的模型返回。每项包含 modals、output_token_base_price(目录价)和 output_token_discount_price(折后价),价格为每百万 Token,单位为万分之一元。
boolean
必填
是否阶梯计费。为 true 时价格按单次请求的 Token 数分区间,各区间价格见 tiered_billing_configs 。
object[]
阶梯计费配置,仅 is_tiered_billing 为 true 时返回。单次请求按输入 Token 数落入的区间计费;少数模型同时按输出 Token 数划分区间。阶梯计费模型的实际价格以各区间的 pricing 为准,顶层 input_token_price_per_m 和 output_token_price_per_m 与最高输入区间一致。
最后修改于 2026年11月2日