Files
Beyhan Oğur 880f412e2c first commit
2026-04-26 21:52:23 +03:00

263 lines
8.0 KiB
YAML

# LiteLLM - OpenAI-compatible Endpoints
# Reuses OpenAI integration schemas
text-completions:
post:
operationId: litellmOpenAITextCompletions
summary: Text completions (LiteLLM - OpenAI format)
description: |
Creates a text completion using OpenAI-compatible format via LiteLLM.
This is the legacy completions API.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/text.yaml#/OpenAITextCompletionRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/text.yaml#/OpenAITextCompletionResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/openai/text.yaml#/OpenAITextCompletionStreamResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
chat-completions:
post:
operationId: litellmOpenAIChatCompletions
summary: Chat completions (LiteLLM - OpenAI format)
description: |
Creates a chat completion using OpenAI-compatible format via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/chat.yaml#/OpenAIChatRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/inference/chat.yaml#/ChatCompletionResponse'
text/event-stream:
schema:
$ref: '../../../schemas/inference/chat.yaml#/ChatCompletionStreamResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
embeddings:
post:
operationId: litellmOpenAIEmbeddings
summary: Create embeddings (LiteLLM - OpenAI format)
description: |
Creates embeddings using OpenAI-compatible format via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/embeddings.yaml#/OpenAIEmbeddingRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/inference/embeddings.yaml#/EmbeddingResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
models:
get:
operationId: litellmOpenAIListModels
summary: List models (LiteLLM - OpenAI format)
description: |
Lists available models using OpenAI-compatible format via LiteLLM.
tags:
- LiteLLM Integration
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/common.yaml#/OpenAIListModelsResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
responses:
post:
operationId: litellmOpenAIResponses
summary: Create response (LiteLLM - OpenAI Responses API)
description: |
Creates a response using OpenAI Responses API format via LiteLLM.
Supports streaming via SSE.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/responses.yaml#/OpenAIResponsesRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/responses.yaml#/OpenAIResponsesResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/openai/responses.yaml#/OpenAIResponsesStreamResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
responses-input-tokens:
post:
operationId: litellmOpenAICountInputTokens
summary: Count input tokens (LiteLLM - OpenAI format)
description: |
Counts the number of tokens in a Responses API request via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/responses.yaml#/OpenAIResponsesRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/inference/count-tokens.yaml#/CountTokensResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
speech:
post:
operationId: litellmOpenAISpeech
summary: Create speech (LiteLLM - OpenAI TTS)
description: |
Generates audio from text using OpenAI TTS via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/audio.yaml#/OpenAISpeechRequest'
responses:
'200':
description: Successful response
content:
audio/mpeg:
schema:
type: string
format: binary
text/event-stream:
schema:
$ref: '../../../schemas/integrations/openai/audio.yaml#/OpenAISpeechStreamResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
transcriptions:
post:
operationId: litellmOpenAITranscriptions
summary: Create transcription (LiteLLM - OpenAI Whisper)
description: |
Transcribes audio into text using OpenAI Whisper via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../../schemas/integrations/openai/audio.yaml#/OpenAITranscriptionRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/openai/audio.yaml#/OpenAITranscriptionResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/openai/audio.yaml#/OpenAITranscriptionStreamResponse'
'400':
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []