Get the List of Proxies for a Service
Through this interface, you can obtain a list of all proxy endpoints under a specific service. Proxy endpoints are typically used for OpenAI-compatible forwarding proxy services.
This interface does not require authentication.
¶ Interface Description
- Request Method: GET
- Request URL:
https://platform.acedata.cloud/api/v1/services/{id_or_alias}/proxies/ - Request Headers:
- accept:
application/json
- accept:
Where {id_or_alias} is the UUID or alias of the service.
¶ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ordering |
string | No | Sorting field, such as -created_at (in descending order of creation time) |
¶ CURL Request Example
curl -X GET \
-H "accept: application/json" \
"https://platform.acedata.cloud/api/v1/services/chatgpt/proxies/"
¶ Example of Returned Result
{
"count": 2,
"results": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "ChatGPT Chat Completions Proxy",
"endpoint": "/v1/chat/completions",
"stage": "Production",
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "ChatGPT Embeddings Proxy",
"endpoint": "/v1/embeddings",
"stage": "Production",
"created_at": "2024-01-10T08:00:00Z"
}
]
}
¶ Description of Returned Fields
| Field | Type | Description |
|---|---|---|
count |
integer | Total count |
results |
array | List of proxies |
results[].id |
string | Unique identifier for the proxy |
results[].name |
string | Name of the proxy |
results[].endpoint |
string | Proxy endpoint path (OpenAI compatible format) |
results[].stage |
string | Stage status: Alpha, Beta, Production |
results[].created_at |
string | Creation time |
¶ Applicable Scenarios
- View Proxy Endpoints: Understand which OpenAI-compatible proxy endpoints are provided by a specific service.
- Integration Development: Obtain proxy endpoint paths for configuring the
base_urlof the OpenAI SDK.
¶ Code Example
Python:
import requests
service_alias = "chatgpt"
url = f"https://platform.acedata.cloud/api/v1/services/{service_alias}/proxies/"
headers = {"accept": "application/json"}
response = requests.get(url, headers=headers)
data = response.json()
for proxy in data["results"]:
print(f"{proxy['name']}: {proxy['endpoint']} ({proxy['stage']})")
