OpenAPI 3.1.02026-08-226994571.1 MB

1e929292ddd5

Update Pass Through Endpoints

Update a pass-through endpoint by ID.

post/config/pass_through_endpoint/{endpoint_id}

Path parameters

endpoint_idstring required

Request body

idstring nullable

Optional unique identifier for the pass-through endpoint. If not provided, endpoints will be identified by path for backwards compatibility.

pathstring required

The route to be added to the LiteLLM Proxy Server.

targetstring required

The URL to which requests for this path should be forwarded.

headersobject

Key-value pairs of headers to be forwarded with the request. You can set any key value pair here and it will be forwarded to your target endpoint

default_query_paramsobject

Key-value pairs of default query parameters to be sent with every request to this endpoint. These can be overridden by client-provided query parameters. For example: {'key': 'default_value', 'api_version': '2023-01'}

include_subpathboolean

If True, requests to subpaths of the path will be forwarded to the target endpoint. For example, if the path is /bria and include_subpath is True, requests to /bria/v1/text-to-image/base/2.3 will be forwarded to the target endpoint.

cost_per_requestnumber

The USD cost per request to the target endpoint. This is used to calculate the cost of the request to the target endpoint.

authboolean

Whether authentication is required for the pass-through endpoint. If True, requests to the endpoint will require a valid LiteLLM API key.

guardrailsobject nullable

Guardrails configuration for this passthrough endpoint. Dict keys are guardrail names, values are optional settings for field targeting. When set, all org/team/key level guardrails will also execute. Defaults to None (no guardrails execute).

is_from_configboolean

True if this endpoint is defined in the config file, False if from DB. Config-defined endpoints cannot be edited via the UI.

methodsstring[] nullable

List of HTTP methods this endpoint handles (e.g., ['GET', 'POST']). If None or empty, all methods (GET, POST, PUT, DELETE, PATCH) are supported for backward compatibility. This allows the same path to have different targets for different HTTP methods.

Response

Successful Response

{"stackTrail":"paths:/config/pass_through_endpoint/{endpoint_id}:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}