openapi: 3.2.0 info: title: LiteLLM llm utils API description: "Enterprise Edition \n\nProxy Server to call 100+ LLMs in the OpenAI format. [**Customize Swagger Docs**](https://docs.litellm.ai/docs/proxy/enterprise#swagger-docs---custom-routes--branding)\n\n\U0001F449 [```LiteLLM Admin Panel on /ui```](/ui). Create, Edit Keys with SSO. Having issues? Try [```Fallback Login```](/fallback/login)\n\n\U0001F4B8 [```LiteLLM Model Cost Map```](https://models.litellm.ai/).\n\n\U0001F50E [```LiteLLM Model Hub```](/ui/model_hub_table). See available models on the proxy. [**Docs**](https://docs.litellm.ai/docs/proxy/ai_hub)" version: 1.95.0 x-operator: institution x-provenance: method: probed source: https://llmproxy.uva.nl/openapi.json retrieved: '2026-08-19' note: Document is generated by the LiteLLM proxy software the University of Amsterdam self-hosts; the deployment, the key issuance and the host (llmproxy.uva.nl, UvA Azure) are the institution's. servers[] added by API Evangelist because the served document omits it; nothing else altered. servers: - url: https://llmproxy.uva.nl description: University of Amsterdam / Amsterdam University of Applied Sciences shared AI gateway tags: - name: llm utils paths: /utils/token_counter: post: tags: - llm utils summary: Token Counter description: "Args:\n request: TokenCountRequest\n call_endpoint: bool - When set to \"True\" it will call the token counting endpoint - e.g Anthropic or Google AI Studio Token Counting APIs.\n\nReturns:\n TokenCountResponse" operationId: token_counter_utils_token_counter_post security: - APIKeyHeader: [] parameters: - name: call_endpoint in: query required: false schema: type: boolean default: false title: Call Endpoint requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TokenCountRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TokenCountResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /utils/supported_openai_params: get: tags: - llm utils summary: Supported Openai Params description: 'Returns supported openai params for a given litellm model name e.g. `gpt-4` vs `gpt-3.5-turbo` Example curl: ``` curl -X GET --location ''http://localhost:4000/utils/supported_openai_params?model=gpt-3.5-turbo-16k'' --header ''Authorization: Bearer sk-1234'' ```' operationId: supported_openai_params_utils_supported_openai_params_get security: - APIKeyHeader: [] parameters: - name: model in: query required: true schema: type: string title: Model responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /utils/transform_request: post: tags: - llm utils summary: Transform Request operationId: transform_request_utils_transform_request_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TransformRequestBody' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/RawRequestTypedDict' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - APIKeyHeader: [] components: schemas: TransformRequestBody: properties: call_type: $ref: '#/components/schemas/CallTypes' request_body: additionalProperties: true type: object title: Request Body type: object required: - call_type - request_body title: TransformRequestBody ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError TokenCountResponse: properties: total_tokens: type: integer title: Total Tokens request_model: type: string title: Request Model model_used: type: string title: Model Used tokenizer_type: type: string title: Tokenizer Type original_response: anyOf: - additionalProperties: true type: object - type: 'null' title: Original Response error: type: boolean title: Error default: false error_message: anyOf: - type: string - type: 'null' title: Error Message status_code: anyOf: - type: integer - type: 'null' title: Status Code type: object required: - total_tokens - request_model - model_used - tokenizer_type title: TokenCountResponse TokenCountRequest: properties: model: type: string title: Model prompt: anyOf: - type: string - type: 'null' title: Prompt messages: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' title: Messages contents: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' title: Contents tools: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' title: Tools system: anyOf: - {} - type: 'null' title: System type: object required: - model title: TokenCountRequest HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError CallTypes: type: string enum: - embedding - aembedding - completion - acompletion - atext_completion - text_completion - image_generation - aimage_generation - image_edit - aimage_edit - moderation - amoderation - atranscription - transcription - aspeech - speech - rerank - arerank - search - asearch - _arealtime - _aresponses_websocket - create_batch - acreate_batch - aretrieve_batch - retrieve_batch - acancel_batch - cancel_batch - pass_through_endpoint - anthropic_messages - aanthropic_messages - get_assistants - aget_assistants - create_assistants - acreate_assistants - delete_assistant - adelete_assistant - acreate_thread - create_thread - aget_thread - get_thread - a_add_message - add_message - aget_messages - get_messages - arun_thread - run_thread - arun_thread_stream - run_thread_stream - afile_retrieve - file_retrieve - afile_delete - file_delete - afile_list - file_list - acreate_file - create_file - afile_content - file_content - create_fine_tuning_job - acreate_fine_tuning_job - create_video - acreate_video - avideo_retrieve - video_retrieve - avideo_content - video_content - video_remix - avideo_remix - video_list - avideo_list - video_retrieve_job - avideo_retrieve_job - video_delete - avideo_delete - video_create_character - avideo_create_character - video_get_character - avideo_get_character - video_edit - avideo_edit - video_extension - avideo_extension - vector_store_file_create - avector_store_file_create - vector_store_file_list - avector_store_file_list - vector_store_file_retrieve - avector_store_file_retrieve - vector_store_file_content - avector_store_file_content - vector_store_file_update - avector_store_file_update - vector_store_file_delete - avector_store_file_delete - vector_store_create - avector_store_create - vector_store_search - avector_store_search - ingest - aingest - query - aquery - create_container - acreate_container - list_containers - alist_containers - retrieve_container - aretrieve_container - delete_container - adelete_container - list_container_files - alist_container_files - upload_container_file - aupload_container_file - create_sandbox - acreate_sandbox - delete_sandbox - adelete_sandbox - run_code - arun_code - code_interpreter_tool - acode_interpreter_tool - acancel_fine_tuning_job - cancel_fine_tuning_job - alist_fine_tuning_jobs - list_fine_tuning_jobs - aretrieve_fine_tuning_job - retrieve_fine_tuning_job - responses - aresponses - alist_input_items - llm_passthrough_route - allm_passthrough_route - generate_content - agenerate_content - generate_content_stream - agenerate_content_stream - ocr - aocr - call_mcp_tool - list_mcp_tools - asend_message - send_message - acreate_skill title: CallTypes RawRequestTypedDict: properties: raw_request_api_base: anyOf: - type: string - type: 'null' title: Raw Request Api Base raw_request_body: anyOf: - additionalProperties: true type: object - type: 'null' title: Raw Request Body raw_request_headers: anyOf: - additionalProperties: true type: object - type: 'null' title: Raw Request Headers error: anyOf: - type: string - type: 'null' title: Error type: object title: RawRequestTypedDict securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key