diff --git a/api-reference/custom_endpoints/get_custom_endpoint_list.mdx b/api-reference/custom_endpoints/get_custom_endpoint_list.mdx new file mode 100644 index 0000000..6ea5fb0 --- /dev/null +++ b/api-reference/custom_endpoints/get_custom_endpoint_list.mdx @@ -0,0 +1,53 @@ +--- +title: 'Get Custom Endpoint List' +api: 'GET /v0/custom_endpoint/list' +--- +Returns a list of the available custom endpoints. + +#### Authorizations + + + Bearer authentication header of the form `Bearer `, where `` is your auth token. + + + + +```bash cURL +curl --request GET \ + --url 'https://api.unify.ai/v0/custom_endpoint/list' \ + --header 'Authorization: Bearer ' +``` + +```python Python +import requests + +url = "https://api.unify.ai/v0/custom_endpoint/list" + +headers = {"Authorization": "Bearer "} + +response = requests.request("GET", url, headers=headers) + +print(response.text) +``` + + + + +```json 200 +[ + { + "name": "endpoint_1", + "mdl_name": "llama_finetune", + "url": "https://...", + "key": "custom_key_1" + }, + { + "name": "endpoint_2", + "mdl_name": "mixtral_finetune", + "url": "https://...", + "key": "custom_key_2" + } +] +``` + + diff --git a/api-reference/openapi.json b/api-reference/openapi.json index 43e198c..593e387 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -652,6 +652,51 @@ } } }, + "/v0/custom_endpoint/list": { + "get": { + "tags": [ + "Custom Endpoints" + ], + "summary": "Get Custom Endpoint List", + "description": "Returns a list of the available custom endpoints.", + "operationId": "get_custom_endpoint_list_v0_custom_endpoint_list_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/CustomEndpointModelResponse" + }, + "type": "array", + "title": "Response Get Custom Endpoint List V0 Custom Endpoint List Get" + }, + "example": [ + { + "name": "endpoint_1", + "mdl_name": "llama_finetune", + "url": "https://...", + "key": "custom_key_1" + }, + { + "name": "endpoint_2", + "mdl_name": "mixtral_finetune", + "url": "https://...", + "key": "custom_key_2" + } + ] + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, "/v0/custom_api_key": { "post": { "tags": [ @@ -3400,6 +3445,34 @@ ], "title": "CustomApiKeyModelResponse" }, + "CustomEndpointModelResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "mdl_name": { + "type": "string", + "title": "Mdl Name" + }, + "url": { + "type": "string", + "title": "Url" + }, + "key": { + "type": "string", + "title": "Key" + } + }, + "type": "object", + "required": [ + "name", + "mdl_name", + "url", + "key" + ], + "title": "CustomEndpointModelResponse" + }, "EvaluatorConfig": { "properties": { "name": { diff --git a/mint.json b/mint.json index 6894447..7430fe2 100644 --- a/mint.json +++ b/mint.json @@ -134,7 +134,8 @@ "pages": [ "api-reference/custom_endpoints/create_custom_endpoint", "api-reference/custom_endpoints/delete_custom_endpoint", - "api-reference/custom_endpoints/rename_custom_endpoint" + "api-reference/custom_endpoints/rename_custom_endpoint", + "api-reference/custom_endpoints/get_custom_endpoint_list" ] }, {