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

263 lines
8.1 KiB
YAML

# PydanticAI - OpenAI-compatible Endpoints
# Reuses OpenAI integration schemas
text-completions:
post:
operationId: pydanticaiOpenAITextCompletions
summary: Text completions (PydanticAI - OpenAI format)
description: |
Creates a text completion using OpenAI-compatible format via PydanticAI.
This is the legacy completions API.
tags:
- PydanticAI 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: pydanticaiOpenAIChatCompletions
summary: Chat completions (PydanticAI - OpenAI format)
description: |
Creates a chat completion using OpenAI-compatible format via PydanticAI.
tags:
- PydanticAI 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: pydanticaiOpenAIEmbeddings
summary: Create embeddings (PydanticAI - OpenAI format)
description: |
Creates embeddings using OpenAI-compatible format via PydanticAI.
tags:
- PydanticAI 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: pydanticaiOpenAIListModels
summary: List models (PydanticAI - OpenAI format)
description: |
Lists available models using OpenAI-compatible format via PydanticAI.
tags:
- PydanticAI 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: pydanticaiOpenAIResponses
summary: Create response (PydanticAI - OpenAI Responses API)
description: |
Creates a response using OpenAI Responses API format via PydanticAI.
Supports streaming via SSE.
tags:
- PydanticAI 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: pydanticaiOpenAICountInputTokens
summary: Count input tokens (PydanticAI - OpenAI format)
description: |
Counts the number of tokens in a Responses API request via PydanticAI.
tags:
- PydanticAI 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: pydanticaiOpenAISpeech
summary: Create speech (PydanticAI - OpenAI TTS)
description: |
Generates audio from text using OpenAI TTS via PydanticAI.
tags:
- PydanticAI 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: pydanticaiOpenAITranscriptions
summary: Create transcription (PydanticAI - OpenAI Whisper)
description: |
Transcribes audio into text using OpenAI Whisper via PydanticAI.
tags:
- PydanticAI 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: []