Membuat aturan routing.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateModelApi |
create |
*Semua sumber daya.
|
None | None |
Sintaks permintaan
POST HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| GwClusterId |
string |
Yes |
ID instans gerbang. |
pg-xxxxxxxxxx |
| Name |
string |
Yes |
Nama API model. |
test |
| ModelCategory |
string |
Yes |
Kategori. Nilai valid:
|
text |
| PathPrefix |
string |
Yes |
Awalan jalur API. |
/test |
| Protocol |
string |
Yes |
Protokol. Nilai valid:
|
openai |
| RecordInput |
string |
No |
Jumlah poin input. |
10 |
| RecordOutput |
string |
No |
Jumlah poin output. |
10 |
| RouteRules |
string |
Yes |
Daftar aturan routing (array string JSON). |
[ { "RuleName": "string", "FallbackMode": "failover", "MatchModelListJson": "[]", "providerBalancerAlgorithm": "round-robin", "Providers": [ { "ModelServiceName": "string", "Weight": "0", "model_protocol": "vllm" "ModelList": "[]" } ], "FallbackProviders": [ { "ModelServiceName": "string", "model_protocol": "anthropic", "Weight": "10", "ModelList": "[]" } ] } ] |
| Config |
string |
No |
Konfigurasi percobaan ulang gerbang. |
{ "failover": { "enabled": true, "max_provider_retries": 2, "max_failover_providers": 1, "retryable_status_codes": [429, 500, 502, 503, 504], "retry_delay": 0.5 } } |
| ForceModel |
string |
No |
Model yang dipaksa. |
xxx |
| RegionId |
string |
No |
ID wilayah. |
cn-beijing |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Respons. |
||
| RequestId |
string |
ID permintaan. |
6BD9CDE4-5E7B-4BF3-9BB8-83C73E****** |
| ModelApiId |
string |
ID API model. |
mi-xxxxxx |
| InvokeEndpoint |
string |
Titik akhir permintaan. |
xxx |
| Status |
string |
Status API model. |
Enable |
Contoh
Respons sukses
JSONformat
{
"RequestId": "6BD9CDE4-5E7B-4BF3-9BB8-83C73E******",
"ModelApiId": "mi-xxxxxx",
"InvokeEndpoint": "xxx",
"Status": "Enable"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.