Créer une nouvelle clé API
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Analytics Service Key',
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
scopes: '["chat.completions","responses"]',
limit: 1,
include_byok_in_limit: true,
expires_at: '2023-11-07T05:31:56Z',
disabled: false,
soft_blocked: false,
limits: {
daily: {requests: 1, cost: 1},
weekly: {requests: 1, cost: 1},
monthly: {requests: 1, cost: 1}
}
})
};
fetch('https://api.phaseo.app/v1/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.phaseo.app/v1/keys"
payload = {
"name": "Analytics Service Key",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": "[\"chat.completions\",\"responses\"]",
"limit": 1,
"include_byok_in_limit": True,
"expires_at": "2023-11-07T05:31:56Z",
"disabled": False,
"soft_blocked": False,
"limits": {
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.phaseo.app/v1/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Analytics Service Key",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": "[\"chat.completions\",\"responses\"]",
"limit": 1,
"include_byok_in_limit": true,
"expires_at": "2023-11-07T05:31:56Z",
"disabled": false,
"soft_blocked": false,
"limits": {
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/v1/keys"
payload := strings.NewReader("{\n \"name\": \"Analytics Service Key\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": \"[\\\"chat.completions\\\",\\\"responses\\\"]\",\n \"limit\": 1,\n \"include_byok_in_limit\": true,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"disabled\": false,\n \"soft_blocked\": false,\n \"limits\": {\n \"daily\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"weekly\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"monthly\": {\n \"requests\": 1,\n \"cost\": 1\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.phaseo.app/v1/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Analytics Service Key\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": \"[\\\"chat.completions\\\",\\\"responses\\\"]\",\n \"limit\": 1,\n \"include_byok_in_limit\": true,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"disabled\": false,\n \"soft_blocked\": false,\n \"limits\": {\n \"daily\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"weekly\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"monthly\": {\n \"requests\": 1,\n \"cost\": 1\n }\n }\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/v1/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Analytics Service Key',
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scopes' => '["chat.completions","responses"]',
'limit' => 1,
'include_byok_in_limit' => true,
'expires_at' => '2023-11-07T05:31:56Z',
'disabled' => false,
'soft_blocked' => false,
'limits' => [
'daily' => [
'requests' => 1,
'cost' => 1
],
'weekly' => [
'requests' => 1,
'cost' => 1
],
'monthly' => [
'requests' => 1,
'cost' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/v1/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Analytics Service Key\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": \"[\\\"chat.completions\\\",\\\"responses\\\"]\",\n \"limit\": 1,\n \"include_byok_in_limit\": true,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"disabled\": false,\n \"soft_blocked\": false,\n \"limits\": {\n \"daily\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"weekly\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"monthly\": {\n \"requests\": 1,\n \"cost\": 1\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "11111111-1111-4111-8111-111111111111",
"hash": "a3f5b7c9d8e1f23456789abcdeffedcba9876543210fedcba1234567890abcdef",
"workspace_id": "22222222-2222-4222-8222-222222222222",
"name": "Analytics Service Key",
"label": "Analytics Service Key",
"prefix": "phaseo_v1_sk_abcd1234",
"status": "active",
"disabled": false,
"soft_blocked": false,
"scopes": "[\"chat.completions\",\"responses\"]",
"creator_user_id": "<string>",
"created_by": "user_abc123",
"created_at": "2026-04-28T12:00:00.000Z",
"updated_at": "2026-04-28T12:15:00.000Z",
"last_used_at": "2026-04-28T12:30:00.000Z",
"expires_at": "2027-12-31T23:59:59.000Z",
"include_byok_in_limit": true,
"limit": 123,
"limit_reset": "daily",
"limit_remaining": 123,
"usage": 123,
"usage_daily": 123,
"usage_weekly": 123,
"usage_monthly": 123,
"limits": {
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
},
"usage_details": {
"total": {
"requests": 1,
"cost": 1
},
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
},
"key": "phaseo_v1_sk_abcd1234_supersecretvalue"
}
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}Clés API
Créer une clé API
Créer une nouvelle clé API dans l’espace de travail authentifié.
POST
/
keys
Créer une nouvelle clé API
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Analytics Service Key',
workspace_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
scopes: '["chat.completions","responses"]',
limit: 1,
include_byok_in_limit: true,
expires_at: '2023-11-07T05:31:56Z',
disabled: false,
soft_blocked: false,
limits: {
daily: {requests: 1, cost: 1},
weekly: {requests: 1, cost: 1},
monthly: {requests: 1, cost: 1}
}
})
};
fetch('https://api.phaseo.app/v1/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.phaseo.app/v1/keys"
payload = {
"name": "Analytics Service Key",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": "[\"chat.completions\",\"responses\"]",
"limit": 1,
"include_byok_in_limit": True,
"expires_at": "2023-11-07T05:31:56Z",
"disabled": False,
"soft_blocked": False,
"limits": {
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.phaseo.app/v1/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Analytics Service Key",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": "[\"chat.completions\",\"responses\"]",
"limit": 1,
"include_byok_in_limit": true,
"expires_at": "2023-11-07T05:31:56Z",
"disabled": false,
"soft_blocked": false,
"limits": {
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
}
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/v1/keys"
payload := strings.NewReader("{\n \"name\": \"Analytics Service Key\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": \"[\\\"chat.completions\\\",\\\"responses\\\"]\",\n \"limit\": 1,\n \"include_byok_in_limit\": true,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"disabled\": false,\n \"soft_blocked\": false,\n \"limits\": {\n \"daily\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"weekly\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"monthly\": {\n \"requests\": 1,\n \"cost\": 1\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.phaseo.app/v1/keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Analytics Service Key\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": \"[\\\"chat.completions\\\",\\\"responses\\\"]\",\n \"limit\": 1,\n \"include_byok_in_limit\": true,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"disabled\": false,\n \"soft_blocked\": false,\n \"limits\": {\n \"daily\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"weekly\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"monthly\": {\n \"requests\": 1,\n \"cost\": 1\n }\n }\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/v1/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Analytics Service Key',
'workspace_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'scopes' => '["chat.completions","responses"]',
'limit' => 1,
'include_byok_in_limit' => true,
'expires_at' => '2023-11-07T05:31:56Z',
'disabled' => false,
'soft_blocked' => false,
'limits' => [
'daily' => [
'requests' => 1,
'cost' => 1
],
'weekly' => [
'requests' => 1,
'cost' => 1
],
'monthly' => [
'requests' => 1,
'cost' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/v1/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Analytics Service Key\",\n \"workspace_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"scopes\": \"[\\\"chat.completions\\\",\\\"responses\\\"]\",\n \"limit\": 1,\n \"include_byok_in_limit\": true,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"disabled\": false,\n \"soft_blocked\": false,\n \"limits\": {\n \"daily\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"weekly\": {\n \"requests\": 1,\n \"cost\": 1\n },\n \"monthly\": {\n \"requests\": 1,\n \"cost\": 1\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "11111111-1111-4111-8111-111111111111",
"hash": "a3f5b7c9d8e1f23456789abcdeffedcba9876543210fedcba1234567890abcdef",
"workspace_id": "22222222-2222-4222-8222-222222222222",
"name": "Analytics Service Key",
"label": "Analytics Service Key",
"prefix": "phaseo_v1_sk_abcd1234",
"status": "active",
"disabled": false,
"soft_blocked": false,
"scopes": "[\"chat.completions\",\"responses\"]",
"creator_user_id": "<string>",
"created_by": "user_abc123",
"created_at": "2026-04-28T12:00:00.000Z",
"updated_at": "2026-04-28T12:15:00.000Z",
"last_used_at": "2026-04-28T12:30:00.000Z",
"expires_at": "2027-12-31T23:59:59.000Z",
"include_byok_in_limit": true,
"limit": 123,
"limit_reset": "daily",
"limit_remaining": 123,
"usage": 123,
"usage_daily": 123,
"usage_weekly": 123,
"usage_monthly": 123,
"limits": {
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
},
"usage_details": {
"total": {
"requests": 1,
"cost": 1
},
"daily": {
"requests": 1,
"cost": 1
},
"weekly": {
"requests": 1,
"cost": 1
},
"monthly": {
"requests": 1,
"cost": 1
}
},
"key": "phaseo_v1_sk_abcd1234_supersecretvalue"
}
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}{
"error": "error_type",
"ok": false,
"message": "Human-readable error message",
"description": "Additional error details.",
"generation_id": "G-abc123",
"status_code": 502,
"error_type": "system",
"error_origin": "upstream",
"reason": "all_candidates_failed",
"attempt_count": 2,
"failed_providers": [
"google-ai-studio",
"openai"
],
"failed_statuses": [
403,
429
],
"upstream_error": {
"code": "PERMISSION_DENIED",
"message": "The caller does not have permission.",
"description": "<string>",
"param": "<string>"
},
"failure_sample": [
{
"provider": "<string>",
"type": "<string>",
"status": 123,
"upstream_error_code": "<string>",
"upstream_error_message": "<string>",
"upstream_error_description": "<string>",
"upstream_error_param": "<string>",
"upstream_payload_preview": "<string>",
"retryable": true
}
],
"provider_failure_diagnostics": {
"category": "credentials_not_configured",
"hint": "<string>",
"provider": "<string>"
},
"routing_diagnostics": {
"filterStages": [
{
"stage": "<string>",
"beforeCount": 123,
"afterCount": 123,
"droppedProviders": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
}
]
},
"provider_candidate_diagnostics": {
"totalProviders": 123,
"supportsEndpointCount": 123,
"candidateCount": 123,
"droppedUnsupportedEndpoint": [
"<string>"
],
"droppedMissingAdapter": [
{
"providerId": "<string>",
"endpoint": "<string>"
}
]
},
"provider_enablement": {
"capability": "<string>",
"providersBefore": [
"<string>"
],
"providersAfter": [
"<string>"
],
"dropped": [
{
"providerId": "<string>",
"reason": "<string>"
}
]
},
"missing_pricing_providers": [
"<string>"
],
"provider_payment_required_provider": "openai",
"provider_payment_required_support_notice": "Our upstream provider billing appears to be unavailable. If this persists, contact support.",
"details": [
{}
]
}Ce point de terminaison nécessite une clé API de gestion. Les clés API Gateway standard ne sont pas acceptées.
limit, limit_reset et include_byok_in_limit sont acceptés ; Phaseo traite actuellement include_byok_in_limit uniquement pour la compatibilité et exclut toujours BYOK de la limite de cette clé.Autorisations
Authentification par jeton Bearer
Corps
application/json
Minimum string length:
1Exemple:
"Analytics Service Key"
Remplacement facultatif de l’espace de travail pour les appels internes.
Exemple:
"[\"chat.completions\",\"responses\"]"
Plafond de dépenses facultatif en USD pour cette clé.
Plage requise:
x >= 0Période utilisée pour la fenêtre du plafond de dépenses.
Options disponibles:
daily, weekly, monthly Accepté pour des raisons de compatibilité. Le comportement actuel de Phaseo exclut toujours BYOK de cette limite.
Show child attributes
Show child attributes
Réponse
Clé API créée
Show child attributes
Show child attributes
Dernière modification le 2 octobre 2026
Cette page vous a-t-elle été utile ?