列出模型
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 兼容。
请求头
响应参数
包含以下属性的模型对象的数组。字段含义与检索模型接口返回的模型对象一致。
显示 properties
显示 properties
输入价格(每百万 Token)。单位为万分之一元,例如 60000 表示 6 元。已包含当前生效的折扣,与 pricing.prompt.price_per_m 相同;不返回 pricing 的模型该值为 0。
输出价格(每百万 Token)。单位为万分之一元。已包含当前生效的折扣,与 pricing.completion.price_per_m 相同;不返回 pricing 的模型该值为 0。
按计费项拆分的价格,每个计费项同时给出目录价和折后价。没有价格的模型不返回该字段。每个计费项都包含以下 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
按输入模态拆分的输入价格,仅按模态分别计价的模型返回。每项包含 modals(模态列表,例如 [“image”])、input_token_base_price(目录价)和 input_token_discount_price(折后价),价格为每百万 Token,单位为万分之一元。
阶梯计费配置,仅 is_tiered_billing 为 true 时返回。单次请求按输入 Token 数落入的区间计费;少数模型同时按输出 Token 数划分区间。阶梯计费模型的实际价格以各区间的 pricing 为准,顶层 input_token_price_per_m 和 output_token_price_per_m 与最高输入区间一致。
最后修改于 2026年11月2日