列出 Devin Desktop 模型与定价
curl --request GET \
--url https://server.codeium.com/api/v2alpha/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.codeium.com/api/v2alpha/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.codeium.com/api/v2alpha/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://server.codeium.com/api/v2alpha/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://server.codeium.com/api/v2alpha/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://server.codeium.com/api/v2alpha/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v2alpha/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{
"models": [
{
"uid": "<string>",
"name": "<string>",
"pricing_dimensions": [
{
"label": "<string>",
"unit": "<string>",
"value": 123,
"denominator": "<string>",
"info": "<string>"
}
]
}
]
}API 参考文档
列出 Devin Desktop 模型与定价
列出你的账户可用的 Devin Desktop 模型,包含模型 UID、名称,以及按令牌或按消息向你的团队计费的价格。
GET
/
api
/
v2alpha
/
models
列出 Devin Desktop 模型与定价
curl --request GET \
--url https://server.codeium.com/api/v2alpha/models \
--header 'Authorization: Bearer <token>'import requests
url = "https://server.codeium.com/api/v2alpha/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://server.codeium.com/api/v2alpha/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://server.codeium.com/api/v2alpha/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://server.codeium.com/api/v2alpha/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://server.codeium.com/api/v2alpha/models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v2alpha/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{
"models": [
{
"uid": "<string>",
"name": "<string>",
"pricing_dimensions": [
{
"label": "<string>",
"unit": "<string>",
"value": 123,
"denominator": "<string>",
"info": "<string>"
}
]
}
]
}概览
此端点处于 alpha 阶段 (
v2alpha) ,响应结构可能会发生变化。身份验证
Authorization 标头中传入 API 密钥:
Authorization: Bearer <api-key>
cog_...) 。该服务用户的角色必须包含 Use Devin Desktop 权限,且该账户需已开启 Devin Desktop 访问权限。
Request
string
不设置时,将列出你的套餐和计费模式允许的所有模型,忽略团队级限制。设置为
allowlist 时,还会应用团队的模型允许列表、组织控制和组限制,使返回的列表与用户在 Devin Desktop 模型选择器中看到的内容一致。请求示例
curl https://server.codeium.com/api/v2alpha/models \
-H "Authorization: Bearer $DEVIN_API_KEY"
curl "https://server.codeium.com/api/v2alpha/models?filter=allowlist" \
-H "Authorization: Bearer $DEVIN_API_KEY"
响应
object[]
调用方可使用的模型。已禁用的模型不会包含在内。
显示 属性
显示 属性
string
稳定的模型标识符,例如
claude-sonnet-4-5。string
在模型选择器中显示的名称。
object[]
该模型向调用方收取的价格。不收费的模型此项为空。
显示 属性
显示 属性
string
计价对象,采用 snake_case 格式:按令牌计价时为
input、output、cached_input、cache_read 或 cache_write;若以非货币单位计价,则为计价的数量单位,例如按消息计价时为 message。Fusion 模型还会以 sidekick_ 前缀列出其辅助模型的价格,例如 sidekick_input 或 sidekick_message。string
value 所使用的单位,采用 snake_case 格式,例如 usd、acus 或 credits。number
以
unit 为单位、按 denominator 计的价格。string
该价格所对应的数量,例如
1M tokens 或 message。string
关于价格的可选说明,例如
Higher effort consumes more tokens。示例响应
{
"models": [
{
"uid": "claude-sonnet-4-5",
"name": "Claude Sonnet 4.5",
"pricing_dimensions": [
{ "label": "input", "unit": "usd", "value": 3, "denominator": "1M tokens" },
{ "label": "cached_input", "unit": "usd", "value": 0.3, "denominator": "1M tokens" },
{ "label": "output", "unit": "usd", "value": 15, "denominator": "1M tokens" }
]
},
{
"uid": "example-model",
"name": "Example Model",
"pricing_dimensions": [
{ "label": "message", "unit": "acus", "value": 0.5, "denominator": "message" }
]
}
]
}
错误响应
{"error": "<message>"} 的形式返回。
| 状态码 | 原因 |
|---|---|
400 | filter 被设置为 allowlist 以外的值 |
401 | API 密钥缺失或无效 |
403 | 该密钥所属用户没有 Devin Desktop 访问权限 |
429 | 超出速率限制;请等待 Retry-After 标头指定的时间后再重试 |

