first commit
This commit is contained in:
188
docs/openapi/paths/integrations/openai/audio.yaml
Normal file
188
docs/openapi/paths/integrations/openai/audio.yaml
Normal file
@@ -0,0 +1,188 @@
|
||||
# OpenAI Integration - Audio Endpoints (Speech and Transcription)
|
||||
|
||||
speech:
|
||||
post:
|
||||
operationId: openaiCreateSpeech
|
||||
summary: Create speech (OpenAI TTS)
|
||||
description: |
|
||||
Generates audio from text using OpenAI TTS.
|
||||
Supports streaming via SSE when stream_format is set to 'sse'.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/audio/speech`).
|
||||
tags:
|
||||
- OpenAI 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
|
||||
audio/opus:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
audio/aac:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
audio/flac:
|
||||
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: []
|
||||
azure-speech:
|
||||
post:
|
||||
operationId: azureCreateSpeech
|
||||
summary: Create speech (Azure OpenAI TTS)
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
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
|
||||
audio/opus:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
audio/aac:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
audio/flac:
|
||||
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: openaiCreateTranscription
|
||||
summary: Create transcription (OpenAI Whisper)
|
||||
description: |
|
||||
Transcribes audio into text using OpenAI Whisper.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/audio/transcriptions`).
|
||||
tags:
|
||||
- OpenAI 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: []
|
||||
azure-transcriptions:
|
||||
post:
|
||||
operationId: azureCreateTranscription
|
||||
summary: Create transcription (Azure OpenAI)
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
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: []
|
||||
154
docs/openapi/paths/integrations/openai/batch.yaml
Normal file
154
docs/openapi/paths/integrations/openai/batch.yaml
Normal file
@@ -0,0 +1,154 @@
|
||||
# OpenAI Integration - Batch API Endpoints
|
||||
|
||||
batches:
|
||||
post:
|
||||
operationId: openaiCreateBatch
|
||||
summary: Create batch job (OpenAI format)
|
||||
description: |
|
||||
Creates a batch processing job.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/batches`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/batch.yaml#/OpenAIBatchCreateRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/batch.yaml#/OpenAIBatchCreateResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
get:
|
||||
operationId: openaiListBatches
|
||||
summary: List batch jobs (OpenAI format)
|
||||
description: |
|
||||
Lists batch processing jobs.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/batches`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: limit
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
default: 30
|
||||
description: Maximum number of batches to return
|
||||
- name: after
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Cursor for pagination
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Filter by provider
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/batch.yaml#/OpenAIBatchListResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
batches-by-id:
|
||||
get:
|
||||
operationId: openaiRetrieveBatch
|
||||
summary: Retrieve batch job (OpenAI format)
|
||||
description: |
|
||||
Retrieves details of a batch processing job.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/batches/{batch_id}`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: batch_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Batch job ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the batch
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/batch.yaml#/OpenAIBatchRetrieveResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
batches-cancel:
|
||||
post:
|
||||
operationId: openaiCancelBatch
|
||||
summary: Cancel batch job (OpenAI format)
|
||||
description: |
|
||||
Cancels a batch processing job.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/batches/{batch_id}/cancel`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: batch_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Batch job ID to cancel
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the batch
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/batch.yaml#/OpenAIBatchCancelResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
111
docs/openapi/paths/integrations/openai/chat.yaml
Normal file
111
docs/openapi/paths/integrations/openai/chat.yaml
Normal file
@@ -0,0 +1,111 @@
|
||||
# OpenAI Integration - Chat Completions Endpoints
|
||||
|
||||
chat-completions:
|
||||
post:
|
||||
operationId: openaiCreateChatCompletion
|
||||
summary: Create chat completion (OpenAI format)
|
||||
description: |
|
||||
Creates a chat completion using OpenAI-compatible format.
|
||||
Supports streaming via SSE.
|
||||
|
||||
**Async inference:** Send `x-bf-async: true` to submit the request as a background job and receive a job ID immediately. Poll with `x-bf-async-id: <job-id>` to retrieve the result. When the job is still processing, the response will have an empty `choices` array. When completed, `choices` will contain the full result. See [Async Inference](/features/async-inference) for details.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/chat/completions`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: x-bf-async
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum: ["true"]
|
||||
description: Set to `true` to submit this request as an async job. Returns immediately with a job ID. Not
|
||||
compatible with streaming.
|
||||
- name: x-bf-async-id
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Poll for results of a previously submitted async job by providing the job ID returned from the
|
||||
initial async request.
|
||||
- name: x-bf-async-job-result-ttl
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 3600
|
||||
description: Override the default result TTL in seconds. Results expire after this duration from completion time.
|
||||
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/integrations/openai/chat.yaml#/OpenAIChatResponse'
|
||||
text/event-stream:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/chat.yaml#/OpenAIChatStreamResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
# Azure deployment path
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
azure-chat-completions:
|
||||
post:
|
||||
operationId: azureCreateChatCompletion
|
||||
summary: Create chat completion (Azure OpenAI)
|
||||
description: |
|
||||
Creates a chat completion using Azure OpenAI deployment.
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Azure API version
|
||||
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/integrations/openai/chat.yaml#/OpenAIChatResponse'
|
||||
text/event-stream:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/chat.yaml#/OpenAIChatStreamResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
397
docs/openapi/paths/integrations/openai/containers.yaml
Normal file
397
docs/openapi/paths/integrations/openai/containers.yaml
Normal file
@@ -0,0 +1,397 @@
|
||||
# OpenAI Integration - Containers API Endpoints
|
||||
|
||||
containers:
|
||||
post:
|
||||
operationId: openaiCreateContainer
|
||||
summary: Create container (OpenAI format)
|
||||
description: |
|
||||
Creates a new container for storing files and data.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerCreateRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerCreateResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
get:
|
||||
operationId: openaiListContainers
|
||||
summary: List containers (OpenAI format)
|
||||
description: |
|
||||
Lists containers for a provider.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider to list containers for (defaults to openai)
|
||||
- name: limit
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
description: Maximum containers to return
|
||||
- name: after
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Cursor for pagination
|
||||
- name: order
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: [asc, desc]
|
||||
description: Sort order
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerListResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
containers-by-id:
|
||||
get:
|
||||
operationId: openaiRetrieveContainer
|
||||
summary: Retrieve container (OpenAI format)
|
||||
description: |
|
||||
Retrieves a specific container by ID.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers/{container_id}`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: container_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Container ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the container (defaults to openai)
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerRetrieveResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
delete:
|
||||
operationId: openaiDeleteContainer
|
||||
summary: Delete container (OpenAI format)
|
||||
description: |
|
||||
Deletes a container.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers/{container_id}`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: container_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Container ID to delete
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the container (defaults to openai)
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerDeleteResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
# =============================================================================
|
||||
# CONTAINER FILES ENDPOINTS
|
||||
# =============================================================================
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
container-files:
|
||||
post:
|
||||
operationId: openaiCreateContainerFile
|
||||
summary: Create file in container (OpenAI format)
|
||||
description: |
|
||||
Creates a new file in a container. You can either upload file content directly
|
||||
via multipart/form-data or reference an existing file by its ID.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers/{container_id}/files`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: container_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Container ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the container (defaults to openai)
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerFileCreateMultipartRequest'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerFileCreateJsonRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerFileCreateResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
get:
|
||||
operationId: openaiListContainerFiles
|
||||
summary: List files in container (OpenAI format)
|
||||
description: |
|
||||
Lists all files in a container.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers/{container_id}/files`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: container_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Container ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the container (defaults to openai)
|
||||
- name: limit
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
description: Maximum files to return
|
||||
- name: after
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Cursor for pagination
|
||||
- name: order
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: [asc, desc]
|
||||
description: Sort order
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerFileListResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
container-files-by-id:
|
||||
get:
|
||||
operationId: openaiRetrieveContainerFile
|
||||
summary: Retrieve file from container (OpenAI format)
|
||||
description: |
|
||||
Retrieves metadata for a specific file in a container.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers/{container_id}/files/{file_id}`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: container_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Container ID
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the container (defaults to openai)
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerFileRetrieveResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
delete:
|
||||
operationId: openaiDeleteContainerFile
|
||||
summary: Delete file from container (OpenAI format)
|
||||
description: |
|
||||
Deletes a file from a container.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers/{container_id}/files/{file_id}`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: container_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Container ID
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID to delete
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the container (defaults to openai)
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/inference/containers.yaml#/ContainerFileDeleteResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
container-files-content:
|
||||
get:
|
||||
operationId: openaiGetContainerFileContent
|
||||
summary: Get file content from container (OpenAI format)
|
||||
description: |
|
||||
Downloads the content of a file from a container.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/containers/{container_id}/files/{file_id}/content`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: container_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Container ID
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the container (defaults to openai)
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
75
docs/openapi/paths/integrations/openai/embeddings.yaml
Normal file
75
docs/openapi/paths/integrations/openai/embeddings.yaml
Normal file
@@ -0,0 +1,75 @@
|
||||
# OpenAI Integration - Embeddings Endpoints
|
||||
|
||||
embeddings:
|
||||
post:
|
||||
operationId: openaiCreateEmbedding
|
||||
summary: Create embeddings (OpenAI format)
|
||||
description: |
|
||||
Creates embedding vectors for the input text.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/embeddings`).
|
||||
tags:
|
||||
- OpenAI 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/integrations/openai/embeddings.yaml#/OpenAIEmbeddingResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
azure-embeddings:
|
||||
post:
|
||||
operationId: azureCreateEmbedding
|
||||
summary: Create embeddings (Azure OpenAI)
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
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/integrations/openai/embeddings.yaml#/OpenAIEmbeddingResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
201
docs/openapi/paths/integrations/openai/files.yaml
Normal file
201
docs/openapi/paths/integrations/openai/files.yaml
Normal file
@@ -0,0 +1,201 @@
|
||||
# OpenAI Integration - Files API Endpoints
|
||||
|
||||
files:
|
||||
post:
|
||||
operationId: openaiUploadFile
|
||||
summary: Upload file (OpenAI format)
|
||||
description: |
|
||||
Uploads a file for use with batch processing or other features.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/files`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/files.yaml#/OpenAIFileUploadRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/files.yaml#/OpenAIFileUploadResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
get:
|
||||
operationId: openaiListFiles
|
||||
summary: List files (OpenAI format)
|
||||
description: |
|
||||
Lists uploaded files.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/files`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: purpose
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Filter by purpose
|
||||
- name: limit
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
description: Maximum files to return
|
||||
- name: after
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Cursor for pagination
|
||||
- name: order
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
enum: [asc, desc]
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Filter by provider
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/files.yaml#/OpenAIFileListResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
files-by-id:
|
||||
get:
|
||||
operationId: openaiRetrieveFile
|
||||
summary: Retrieve file metadata (OpenAI format)
|
||||
description: |
|
||||
Retrieves metadata for an uploaded file.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/files/{file_id}`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the file
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/files.yaml#/OpenAIFileRetrieveResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
delete:
|
||||
operationId: openaiDeleteFile
|
||||
summary: Delete file (OpenAI format)
|
||||
description: |
|
||||
Deletes an uploaded file.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/files/{file_id}`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID to delete
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the file
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/files.yaml#/OpenAIFileDeleteResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
files-content:
|
||||
get:
|
||||
operationId: openaiGetFileContent
|
||||
summary: Get file content (OpenAI format)
|
||||
description: |
|
||||
Retrieves the content of an uploaded file.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/files/{file_id}/content`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: file_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: File ID
|
||||
- name: provider
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Provider for the file
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
88
docs/openapi/paths/integrations/openai/images.yaml
Normal file
88
docs/openapi/paths/integrations/openai/images.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
# OpenAI Integration - Image Generation Endpoints
|
||||
|
||||
image-generation:
|
||||
post:
|
||||
operationId: openaiCreateImage
|
||||
summary: Create image
|
||||
description: |
|
||||
Generates images from text prompts using OpenAI-compatible format.
|
||||
|
||||
**Note:** Azure OpenAI deployments are also supported via the Azure integration endpoint.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/images/generations`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/images.yaml#/OpenAIImageGenerationRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: |
|
||||
Successful response. Returns JSON for non-streaming requests, or Server-Sent Events (SSE) stream when `stream=true`.
|
||||
When streaming, each event contains a chunk of the image as base64 data, with the final event having type `image_generation.completed`.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/images.yaml#/OpenAIImageGenerationResponse'
|
||||
text/event-stream:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/images.yaml#/OpenAIImageStreamResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
azure-image-generation:
|
||||
post:
|
||||
operationId: azureCreateImage
|
||||
summary: Create image (Azure OpenAI)
|
||||
description: |
|
||||
Generates images from text prompts using Azure OpenAI deployment.
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
description: Azure API version
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/images.yaml#/OpenAIImageGenerationRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/images.yaml#/OpenAIImageGenerationResponse'
|
||||
text/event-stream:
|
||||
schema:
|
||||
$ref: '../../../schemas/integrations/openai/images.yaml#/OpenAIImageStreamResponse'
|
||||
'400':
|
||||
$ref: '../../../openapi.yaml#/components/responses/BadRequest'
|
||||
'500':
|
||||
$ref: '../../../openapi.yaml#/components/responses/InternalError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
63
docs/openapi/paths/integrations/openai/models.yaml
Normal file
63
docs/openapi/paths/integrations/openai/models.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
# OpenAI Integration - Models Endpoints
|
||||
|
||||
models:
|
||||
get:
|
||||
operationId: openaiListModels
|
||||
summary: List models (OpenAI format)
|
||||
description: |
|
||||
Lists available models in OpenAI format.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/models`).
|
||||
tags:
|
||||
- OpenAI 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: []
|
||||
azure-models:
|
||||
get:
|
||||
operationId: azureListModels
|
||||
summary: List models (Azure OpenAI)
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
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: []
|
||||
139
docs/openapi/paths/integrations/openai/responses.yaml
Normal file
139
docs/openapi/paths/integrations/openai/responses.yaml
Normal file
@@ -0,0 +1,139 @@
|
||||
# OpenAI Integration - Responses API Endpoints
|
||||
|
||||
responses:
|
||||
post:
|
||||
operationId: openaiCreateResponse
|
||||
summary: Create response (OpenAI Responses API)
|
||||
description: |
|
||||
Creates a response using OpenAI Responses API format.
|
||||
Supports streaming via SSE.
|
||||
|
||||
**Async inference:** Send `x-bf-async: true` to submit the request as a background job and receive a job ID immediately. Poll with `x-bf-async-id: <job-id>` to retrieve the result. When the job is still processing, the response `status` will not be `completed`. When completed, the full response with `output_text` will be returned. See [Async Inference](/features/async-inference) for details.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/responses`).
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
parameters:
|
||||
- name: x-bf-async
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum: ["true"]
|
||||
description: Set to `true` to submit this request as an async job. Returns immediately with a job ID. Not
|
||||
compatible with streaming.
|
||||
- name: x-bf-async-id
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Poll for results of a previously submitted async job by providing the job ID returned from the
|
||||
initial async request.
|
||||
- name: x-bf-async-job-result-ttl
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
default: 3600
|
||||
description: Override the default result TTL in seconds. Results expire after this duration from completion time.
|
||||
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: []
|
||||
azure-responses:
|
||||
post:
|
||||
operationId: azureCreateResponse
|
||||
summary: Create response (Azure OpenAI)
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
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'
|
||||
|
||||
# Input tokens endpoint (count tokens for Responses API format)
|
||||
security:
|
||||
- BearerAuth: []
|
||||
- BasicAuth: []
|
||||
- VirtualKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
responses-input-tokens:
|
||||
post:
|
||||
operationId: openaiCountInputTokens
|
||||
summary: Count input tokens
|
||||
description: |
|
||||
Counts the number of tokens in a Responses API request.
|
||||
tags:
|
||||
- OpenAI 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: []
|
||||
82
docs/openapi/paths/integrations/openai/text.yaml
Normal file
82
docs/openapi/paths/integrations/openai/text.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
# OpenAI Integration - Text Completions Endpoints (Legacy)
|
||||
|
||||
text-completions:
|
||||
post:
|
||||
operationId: openaiCreateTextCompletion
|
||||
summary: Create text completion (OpenAI format)
|
||||
description: |
|
||||
Creates a text completion using OpenAI-compatible format.
|
||||
This is the legacy completions API.
|
||||
|
||||
**Note:** This endpoint also works without the `/v1` prefix (e.g., `/openai/completions`).
|
||||
tags:
|
||||
- OpenAI 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: []
|
||||
azure-text-completions:
|
||||
post:
|
||||
operationId: azureCreateTextCompletion
|
||||
summary: Create text completion (Azure OpenAI)
|
||||
tags:
|
||||
- OpenAI Integration
|
||||
- Azure Integration
|
||||
parameters:
|
||||
- name: deployment-id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
description: Azure deployment ID
|
||||
- name: api-version
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
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: []
|
||||
Reference in New Issue
Block a user