first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:52:23 +03:00
commit 880f412e2c
2662 changed files with 866266 additions and 0 deletions

View File

@@ -0,0 +1,664 @@
# Async Inference Endpoints
# --- Submission endpoints ---
async-chat-completions:
post:
operationId: createAsyncChatCompletion
summary: Create async chat completion
description: |
Submits a chat completion request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
Streaming is not supported for async requests.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/chat.yaml#/ChatCompletionRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-text-completions:
post:
operationId: createAsyncTextCompletion
summary: Create async text completion
description: |
Submits a text completion request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
Streaming is not supported for async requests.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/text.yaml#/TextCompletionRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-responses:
post:
operationId: createAsyncResponse
summary: Create async response
description: |
Submits a response request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
Streaming is not supported for async requests.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/responses.yaml#/ResponsesRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-embeddings:
post:
operationId: createAsyncEmbedding
summary: Create async embedding
description: |
Submits an embedding request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/embeddings.yaml#/EmbeddingRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-speech:
post:
operationId: createAsyncSpeech
summary: Create async speech
description: |
Submits a speech synthesis request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
SSE streaming is not supported for async requests.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/speech.yaml#/SpeechRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-transcriptions:
post:
operationId: createAsyncTranscription
summary: Create async transcription
description: |
Submits a transcription request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
Streaming is not supported for async requests.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../schemas/inference/transcription.yaml#/TranscriptionRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-image-generation:
post:
operationId: createAsyncImageGeneration
summary: Create async image generation
description: |
Submits an image generation request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
Streaming is not supported for async requests.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageGenerationRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-image-edit:
post:
operationId: createAsyncImageEdit
summary: Create async image edit
description: |
Submits an image edit request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
Streaming is not supported for async requests.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageEditRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-image-variation:
post:
operationId: createAsyncImageVariation
summary: Create async image variation
description: |
Submits an image variation request for asynchronous execution. Returns a job ID immediately
with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncResultTTL'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageVariationRequest'
responses:
'202':
description: Job accepted for processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
# --- Retrieval endpoints ---
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-chat-completions-job:
get:
operationId: getAsyncChatCompletionJob
summary: Get async chat completion job
description: |
Retrieves the status and result of an async chat completion job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-text-completions-job:
get:
operationId: getAsyncTextCompletionJob
summary: Get async text completion job
description: |
Retrieves the status and result of an async text completion job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-responses-job:
get:
operationId: getAsyncResponseJob
summary: Get async response job
description: |
Retrieves the status and result of an async response job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-embeddings-job:
get:
operationId: getAsyncEmbeddingJob
summary: Get async embedding job
description: |
Retrieves the status and result of an async embedding job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-speech-job:
get:
operationId: getAsyncSpeechJob
summary: Get async speech job
description: |
Retrieves the status and result of an async speech job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-transcriptions-job:
get:
operationId: getAsyncTranscriptionJob
summary: Get async transcription job
description: |
Retrieves the status and result of an async transcription job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-image-generation-job:
get:
operationId: getAsyncImageGenerationJob
summary: Get async image generation job
description: |
Retrieves the status and result of an async image generation job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-image-edit-job:
get:
operationId: getAsyncImageEditJob
summary: Get async image edit job
description: |
Retrieves the status and result of an async image edit job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
async-image-variation-job:
get:
operationId: getAsyncImageVariationJob
summary: Get async image variation job
description: |
Retrieves the status and result of an async image variation job.
Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.
tags:
- Async Jobs
parameters:
- $ref: '#/components/parameters/AsyncJobId'
responses:
'200':
description: Job completed (successfully or with failure)
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'202':
description: Job is still pending or processing
content:
application/json:
schema:
$ref: '../../schemas/inference/async.yaml#/AsyncJobResponse'
'404':
description: Job not found or expired
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
# --- Shared parameters ---
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
components:
parameters:
AsyncJobId:
name: job_id
in: path
required: true
description: The unique identifier of the async job
schema:
type: string
AsyncResultTTL:
name: x-bf-async-job-result-ttl
in: header
required: false
description: |
Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour).
After expiry, the job result is automatically cleaned up.
schema:
type: integer
default: 3600

View File

@@ -0,0 +1,71 @@
speech:
post:
operationId: createSpeech
summary: Create speech
description: |
Generates audio from the input text. Returns audio data or streams via SSE.
tags:
- Audio
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/speech.yaml#/SpeechRequest'
responses:
'200':
description: Successful response
content:
audio/mpeg:
schema:
type: string
format: binary
application/json:
schema:
$ref: '../../schemas/inference/speech.yaml#/SpeechResponse'
text/event-stream:
schema:
$ref: '../../schemas/inference/speech.yaml#/SpeechStreamResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
transcriptions:
post:
operationId: createTranscription
summary: Create transcription
description: |
Transcribes audio into text in the input language.
tags:
- Audio
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../schemas/inference/transcription.yaml#/TranscriptionRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/transcription.yaml#/TranscriptionResponse'
text/event-stream:
schema:
$ref: '../../schemas/inference/transcription.yaml#/TranscriptionStreamResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,190 @@
batches:
post:
operationId: createBatch
summary: Create a batch job
description: |
Creates a batch job for asynchronous processing.
tags:
- Batch
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/batch.yaml#/BatchCreateRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/batch.yaml#/BatchCreateResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
get:
operationId: listBatches
summary: List batch jobs
description: |
Lists batch jobs for a provider.
tags:
- Batch
parameters:
- name: provider
in: query
required: true
description: Provider to list batches for
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
- name: limit
in: query
description: Maximum number of batches to return
schema:
type: integer
minimum: 1
- name: after
in: query
description: Cursor for pagination
schema:
type: string
- name: before
in: query
description: Cursor for pagination
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/batch.yaml#/BatchListResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batches-by-id:
get:
operationId: retrieveBatch
summary: Retrieve a batch job
description: |
Retrieves a specific batch job by ID.
tags:
- Batch
parameters:
- name: batch_id
in: path
required: true
description: The ID of the batch to retrieve
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the batch
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/batch.yaml#/BatchRetrieveResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batches-cancel:
post:
operationId: cancelBatch
summary: Cancel a batch job
description: |
Cancels a batch job.
tags:
- Batch
parameters:
- name: batch_id
in: path
required: true
description: The ID of the batch to cancel
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the batch
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/batch.yaml#/BatchCancelResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batches-results:
get:
operationId: getBatchResults
summary: Get batch results
description: |
Retrieves results from a completed batch job.
tags:
- Batch
parameters:
- name: batch_id
in: path
required: true
description: The ID of the batch
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the batch
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/batch.yaml#/BatchResultsResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,33 @@
chat-completions:
post:
operationId: createChatCompletion
summary: Create a chat completion
description: |
Creates a completion for the provided messages. Supports streaming via SSE.
tags:
- Chat Completions
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/chat.yaml#/ChatCompletionRequest'
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: []

View File

@@ -0,0 +1,390 @@
containers:
post:
operationId: createContainer
summary: Create a container
description: |
Creates a new container for storing files and data.
tags:
- Containers
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: listContainers
summary: List containers
description: |
Lists containers for a provider.
tags:
- Containers
parameters:
- name: provider
in: query
required: true
description: Provider to list containers for
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
- name: limit
in: query
description: Maximum number of containers to return (1-100, default 20)
schema:
type: integer
minimum: 1
limit: 200
maximum: 100
- name: after
in: query
description: Cursor for pagination
schema:
type: string
- name: order
in: query
description: Sort order (asc/desc)
schema:
type: string
enum: [asc, desc]
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: retrieveContainer
summary: Retrieve a container
description: |
Retrieves a specific container by ID.
tags:
- Containers
parameters:
- name: container_id
in: path
required: true
description: The ID of the container to retrieve
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the container
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
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: deleteContainer
summary: Delete a container
description: |
Deletes a container.
tags:
- Containers
parameters:
- name: container_id
in: path
required: true
description: The ID of the container to delete
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the container
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
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: createContainerFile
summary: Create a file in a container
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.
tags:
- Containers
parameters:
- name: container_id
in: path
required: true
description: The ID of the container
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the container
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
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: listContainerFiles
summary: List files in a container
description: |
Lists all files in a container.
tags:
- Containers
parameters:
- name: container_id
in: path
required: true
description: The ID of the container
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the container
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
- name: limit
in: query
description: Maximum number of files to return
schema:
type: integer
minimum: 1
maximum: 100
- name: after
in: query
description: Cursor for pagination
schema:
type: string
- name: order
in: query
description: Sort order (asc/desc)
schema:
type: string
enum: [asc, desc]
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: retrieveContainerFile
summary: Retrieve a file from a container
description: |
Retrieves metadata for a specific file in a container.
tags:
- Containers
parameters:
- name: container_id
in: path
required: true
description: The ID of the container
schema:
type: string
- name: file_id
in: path
required: true
description: The ID of the file
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the container
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
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: deleteContainerFile
summary: Delete a file from a container
description: |
Deletes a file from a container.
tags:
- Containers
parameters:
- name: container_id
in: path
required: true
description: The ID of the container
schema:
type: string
- name: file_id
in: path
required: true
description: The ID of the file to delete
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the container
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
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: getContainerFileContent
summary: Download file content from a container
description: |
Downloads the content of a file from a container.
tags:
- Containers
parameters:
- name: container_id
in: path
required: true
description: The ID of the container
schema:
type: string
- name: file_id
in: path
required: true
description: The ID of the file
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the container
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
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: []

View File

@@ -0,0 +1,30 @@
count-tokens:
post:
operationId: countTokens
summary: Count tokens
description: |
Counts the number of tokens in the provided messages.
tags:
- Count Tokens
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/count-tokens.yaml#/CountTokensRequest'
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: []

View File

@@ -0,0 +1,30 @@
embeddings:
post:
operationId: createEmbedding
summary: Create embeddings
description: |
Creates an embedding vector representing the input text.
tags:
- Embeddings
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/embeddings.yaml#/EmbeddingRequest'
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: []

View File

@@ -0,0 +1,201 @@
files:
post:
operationId: uploadFile
summary: Upload a file
description: |
Uploads a file to be used with batch operations or other features.
tags:
- Files
parameters:
- name: provider
in: query
description: Provider to upload file to (can also use x-model-provider header)
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../schemas/inference/files.yaml#/FileUploadRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/files.yaml#/FileUploadResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
get:
operationId: listFiles
summary: List files
description: |
Lists files for a provider.
tags:
- Files
parameters:
- name: x-model-provider
in: query
required: true
description: Provider to list files for
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
- name: purpose
in: query
description: Filter by purpose
schema:
$ref: '../../schemas/inference/files.yaml#/FilePurpose'
- name: limit
in: query
description: Maximum number of files to return
schema:
type: integer
minimum: 1
- name: after
in: query
description: Cursor for pagination
schema:
type: string
- name: order
in: query
description: Sort order (asc/desc)
schema:
type: string
enum: [asc, desc]
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/files.yaml#/FileListResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
files-by-id:
get:
operationId: retrieveFile
summary: Retrieve file metadata
description: |
Retrieves metadata for a specific file.
tags:
- Files
parameters:
- name: file_id
in: path
required: true
description: The ID of the file
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the file
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/files.yaml#/FileRetrieveResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
delete:
operationId: deleteFile
summary: Delete a file
description: |
Deletes a file.
tags:
- Files
parameters:
- name: file_id
in: path
required: true
description: The ID of the file to delete
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the file
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/files.yaml#/FileDeleteResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
files-content:
get:
operationId: getFileContent
summary: Download file content
description: |
Downloads the content of a file.
tags:
- Files
parameters:
- name: file_id
in: path
required: true
description: The ID of the file
schema:
type: string
- name: provider
in: query
required: true
description: The provider of the file
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
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: []

View File

@@ -0,0 +1,112 @@
# Image Generation Endpoints
image-generation:
post:
operationId: imageGeneration
summary: Generate an image
description: |
Generates images from text prompts using the specified model.
tags:
- Images
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageGenerationRequest'
responses:
'200':
description: |
Successful response. Returns JSON for non-streaming requests, or Server-Sent Events (SSE) stream when `stream=true`.
When streaming, events are sent with the following event types:
- `image_generation.partial_image`: Intermediate image chunks with base64-encoded image data
- `image_generation.completed`: Final event for each image with usage information
- `error`: Error events with error details
content:
application/json:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageGenerationResponse'
text/event-stream:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageGenerationStreamResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
image-edit:
post:
operationId: imageEdit
summary: Edit an image
description: |
Edits an image using a text prompt and optional mask. Request must be sent as multipart/form-data
with at least `model`, `prompt` (unless `type` is `background_removal`), and `image` (or `image[]`).
tags:
- Images
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageEditRequest'
responses:
'200':
description: |
Successful response. Returns JSON for non-streaming requests, or Server-Sent Events (SSE) stream when `stream=true`.
When streaming, events are sent with the following event types:
- `image_edit.partial_image`: Intermediate image chunks with base64-encoded image data
- `image_edit.completed`: Final event for each image with usage information
- `error`: Error events with error details
content:
application/json:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageGenerationResponse'
text/event-stream:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageEditStreamResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
image-variation:
post:
operationId: imageVariation
summary: Create Variation
description: |
Creates variations of an image. Request must be sent as multipart/form-data with `model` and `image` (or `image[]`).
Does not support streaming.
tags:
- Images
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageVariationRequest'
responses:
'200':
description: Successful response. Returns JSON with generated image variation(s).
content:
application/json:
schema:
$ref: '../../schemas/inference/images.yaml#/ImageGenerationResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,41 @@
models:
get:
operationId: listModels
summary: List available models
description: |
Lists available models. If provider is not specified, lists all models from all configured providers.
tags:
- Models
parameters:
- name: provider
in: query
description: Filter by provider (e.g., openai, anthropic, bedrock)
schema:
$ref: '../../schemas/inference/common.yaml#/ModelProvider'
- name: page_size
in: query
description: Maximum number of models to return
schema:
type: integer
minimum: 0
- name: page_token
in: query
description: Token for pagination
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/models.yaml#/ListModelsResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,30 @@
rerank:
post:
operationId: rerankDocuments
summary: Rerank documents
description: |
Reorders input documents by relevance to a query.
tags:
- Rerank
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/rerank.yaml#/RerankRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/rerank.yaml#/RerankResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,33 @@
responses:
post:
operationId: createResponse
summary: Create a response
description: |
Creates a response using the OpenAI Responses API format. Supports streaming via SSE.
tags:
- Responses
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/responses.yaml#/ResponsesRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/responses.yaml#/ResponsesResponse'
text/event-stream:
schema:
$ref: '../../schemas/inference/responses.yaml#/ResponsesStreamResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,33 @@
text-completions:
post:
operationId: createTextCompletion
summary: Create a text completion
description: |
Creates a completion for the provided prompt. Supports streaming via SSE.
tags:
- Text Completions
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/text.yaml#/TextCompletionRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/inference/text.yaml#/TextCompletionResponse'
text/event-stream:
schema:
$ref: '../../schemas/inference/text.yaml#/TextCompletionStreamResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,311 @@
# Video Generation Endpoints
video-generation:
post:
operationId: videoGeneration
summary: Generate a video
description: |
Creates a video generation job from a text prompt. This is an asynchronous operation
that returns immediately with a job ID. Use the retrieve endpoint to check the status
and get the video URL when generation is complete.
tags:
- Videos
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoGenerationRequest'
responses:
'200':
description: |
Successful response. Returns a video generation job object with status information.
Poll the retrieve endpoint to check completion status.
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoGenerationResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
get:
operationId: videoList
summary: List video generation jobs
description: |
Lists video generation jobs for a specific provider. Results are paginated
and can be filtered using query parameters.
tags:
- Videos
parameters:
- name: provider
in: query
required: true
schema:
type: string
description: Provider name (e.g., "openai", "gemini")
- name: after
in: query
required: false
schema:
type: string
description: Cursor for pagination - ID of the last item from the previous page
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 20
description: Maximum number of results to return
- name: order
in: query
required: false
schema:
type: string
enum:
- "asc"
- "desc"
default: "desc"
description: Sort order by creation time
responses:
'200':
description: Successful response. Returns a paginated list of video generation jobs.
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoListResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
video-by-id:
get:
operationId: videoRetrieve
summary: Retrieve a video generation job
description: |
Retrieves the status and metadata for a video generation job.
Use this endpoint to poll for completion status after creating a video generation job.
When the status is "completed", the response will include a URL to download the video.
tags:
- Videos
parameters:
- name: video_id
in: path
required: true
schema:
type: string
description: Video ID in format `id:provider` (e.g., `video_abc123:openai`)
responses:
'200':
description: Successful response. Returns the video generation job details.
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoGenerationResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Video not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
delete:
operationId: videoDelete
summary: Delete a video generation job
description: |
Deletes a video generation job and its associated assets.
This operation cannot be undone.
tags:
- Videos
parameters:
- name: video_id
in: path
required: true
schema:
type: string
description: Video ID in format `id:provider` (e.g., `video_abc123:openai`)
responses:
'200':
description: Successful response. Returns deletion confirmation.
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoDeleteResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Video not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
video-download:
get:
operationId: videoDownload
summary: Download video content
description: |
Downloads the binary content of a generated video.
The video must have a status of "completed" to be downloadable.
Returns the raw video file (typically MP4 format).
tags:
- Videos
parameters:
- name: video_id
in: path
required: true
schema:
type: string
description: Video ID in format `id:provider` (e.g., `video_abc123:openai`)
- name: variant
in: query
required: false
schema:
type: string
enum:
- "video"
- "thumbnail"
- "spritesheet"
description: Variant of the video content to download (provider-specific)
responses:
'200':
description: Successful response. Returns the video file as binary content.
content:
video/mp4:
schema:
type: string
format: binary
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Video not found or not yet available
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
video-delete:
delete:
operationId: videoDelete
summary: Delete a video generation job
description: |
Deletes a video generation job and its associated assets.
This operation cannot be undone.
tags:
- Videos
parameters:
- name: video_id
in: path
required: true
schema:
type: string
description: Video ID in format `id:provider` (e.g., `video_abc123:openai`)
responses:
'200':
description: Successful response. Returns deletion confirmation.
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoDeleteResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Video not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
video-remix:
post:
operationId: videoRemix
summary: Remix a video
description: |
Creates a new video generation job by remixing an existing video with a new prompt.
The source video must have a status of "completed" to be remixed.
Returns a new video generation job that can be polled for completion.
tags:
- Videos
parameters:
- name: video_id
in: path
required: true
schema:
type: string
description: Video ID in format `id:provider` (e.g., `video_abc123:openai`)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoRemixRequest'
responses:
'200':
description: |
Successful response. Returns a new video generation job object.
Poll the retrieve endpoint to check completion status.
content:
application/json:
schema:
$ref: '../../schemas/inference/videos.yaml#/VideoGenerationResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Source video not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,230 @@
# Anthropic Integration - Batch API Endpoints
batches:
post:
operationId: anthropicCreateBatch
summary: Create batch job (Anthropic format)
description: |
Creates a batch processing job using Anthropic format.
Use x-model-provider header to specify the provider.
tags:
- Anthropic Integration
parameters:
- name: x-model-provider
in: header
schema:
type: string
description: Provider to use (defaults to anthropic)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/batch.yaml#/AnthropicBatchCreateRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/batch.yaml#/AnthropicBatchCreateResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
get:
operationId: anthropicListBatches
summary: List batch jobs (Anthropic format)
description: |
Lists batch processing jobs.
tags:
- Anthropic Integration
parameters:
- name: x-model-provider
in: header
schema:
type: string
description: Provider to use (defaults to anthropic)
- name: page_size
in: query
schema:
type: integer
default: 20
description: Maximum number of batches to return
- name: page_token
in: query
schema:
type: string
description: Cursor for pagination
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/batch.yaml#/AnthropicBatchListResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batches-by-id:
get:
operationId: anthropicRetrieveBatch
summary: Retrieve batch job (Anthropic format)
description: |
Retrieves details of a batch processing job.
tags:
- Anthropic Integration
parameters:
- name: batch_id
in: path
required: true
schema:
type: string
description: Batch job ID
- name: x-model-provider
in: header
schema:
type: string
description: Provider for the batch
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/batch.yaml#/AnthropicBatchRetrieveResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batches-cancel:
post:
operationId: anthropicCancelBatch
summary: Cancel batch job (Anthropic format)
description: |
Cancels a batch processing job.
tags:
- Anthropic Integration
parameters:
- name: batch_id
in: path
required: true
schema:
type: string
description: Batch job ID to cancel
- name: x-model-provider
in: header
schema:
type: string
description: Provider for the batch
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/batch.yaml#/AnthropicBatchCancelResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batches-results:
get:
operationId: anthropicGetBatchResults
summary: Get batch results (Anthropic format)
description: |
Retrieves results of a completed batch job.
tags:
- Anthropic Integration
parameters:
- name: batch_id
in: path
required: true
schema:
type: string
description: Batch job ID
- name: x-model-provider
in: header
schema:
type: string
description: Provider for the batch
responses:
'200':
description: Successful response (JSONL stream)
content:
application/x-ndjson:
schema:
type: string
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,40 @@
# Anthropic Integration - Count Tokens Endpoints
count-tokens:
post:
operationId: anthropicCountTokens
summary: Count tokens (Anthropic format)
description: |
Counts the number of tokens in a message request.
tags:
- Anthropic Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/count-tokens.yaml#/AnthropicCountTokensRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/count-tokens.yaml#/AnthropicCountTokensResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,209 @@
# Anthropic Integration - Files API Endpoints
files:
post:
operationId: anthropicUploadFile
summary: Upload file (Anthropic format)
description: |
Uploads a file. Use x-model-provider header to specify the provider.
tags:
- Anthropic Integration
parameters:
- name: x-model-provider
in: header
schema:
type: string
description: Provider to use (defaults to anthropic)
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../../schemas/integrations/anthropic/files.yaml#/AnthropicFileUploadRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/files.yaml#/AnthropicFileUploadResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
get:
operationId: anthropicListFiles
summary: List files (Anthropic format)
description: |
Lists uploaded files.
tags:
- Anthropic Integration
parameters:
- name: x-model-provider
in: header
schema:
type: string
description: Provider to use (defaults to anthropic)
- name: limit
in: query
schema:
type: integer
default: 30
description: Maximum files to return
- name: after_id
in: query
schema:
type: string
description: Cursor for pagination
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/files.yaml#/AnthropicFileListResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
files-content:
get:
operationId: anthropicGetFileContent
summary: Get file content (Anthropic format)
description: |
Retrieves file content. Returns raw binary file data when Accept header is set to application/octet-stream,
or file metadata as JSON when Accept header is set to application/json.
tags:
- Anthropic Integration
parameters:
- name: file_id
in: path
required: true
schema:
type: string
description: File ID
- name: x-model-provider
in: header
schema:
type: string
description: Provider for the file
- name: Accept
in: header
schema:
type: string
enum: [application/json, application/octet-stream]
default: application/json
description: Response content type - use application/octet-stream for binary download
responses:
'200':
description: |
Successful response. Returns file metadata as JSON or raw binary file content.
When returning binary content, the Content-Type header indicates the file's MIME type
and Content-Disposition header may include the filename.
headers:
Content-Type:
schema:
type: string
description: MIME type of the file (e.g., application/pdf, image/png, text/plain)
Content-Disposition:
schema:
type: string
description: Attachment filename directive (e.g., attachment; filename="document.pdf")
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/files.yaml#/AnthropicFileRetrieveResponse'
application/octet-stream:
schema:
type: string
format: binary
description: Raw binary file content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
files-by-id:
delete:
operationId: anthropicDeleteFile
summary: Delete file (Anthropic format)
description: |
Deletes an uploaded file.
tags:
- Anthropic Integration
parameters:
- name: file_id
in: path
required: true
schema:
type: string
description: File ID to delete
- name: x-model-provider
in: header
schema:
type: string
description: Provider for the file
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/files.yaml#/AnthropicFileDeleteResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,119 @@
# Anthropic Integration - Messages API Endpoints
messages:
post:
operationId: anthropicCreateMessage
summary: Create message (Anthropic format)
description: |
Creates a message using Anthropic Messages 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 will have an empty `content` array. When completed, `content` will contain the full result. See [Async Inference](/features/async-inference) for details.
tags:
- Anthropic 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/anthropic/messages.yaml#/AnthropicMessageRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
# Wildcard path for extended messages endpoints (e.g., /v1/messages/batches)
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
messages-wildcard:
post:
operationId: anthropicCreateMessageWildcard
summary: Create message (Anthropic format) - wildcard
description: |
Handles extended messages API paths.
tags:
- Anthropic Integration
parameters:
- name: path
in: path
required: true
schema:
type: string
description: Extended path
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,50 @@
# Anthropic Integration - Models Endpoints
models:
get:
operationId: anthropicListModels
summary: List models (Anthropic format)
description: |
Lists available models in Anthropic format.
tags:
- Anthropic Integration
parameters:
- name: limit
in: query
schema:
type: integer
description: Maximum number of models to return
- name: before_id
in: query
schema:
type: string
description: Return models before this ID
- name: after_id
in: query
schema:
type: string
description: Return models after this ID
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicListModelsResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,44 @@
# Anthropic Integration - Legacy Complete API Endpoints
complete:
post:
operationId: anthropicCreateComplete
summary: Create completion (Anthropic legacy format)
description: |
Creates a text completion using Anthropic's legacy Complete API.
Supports streaming via SSE.
tags:
- Anthropic Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/text.yaml#/AnthropicTextRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/text.yaml#/AnthropicTextResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/anthropic/text.yaml#/AnthropicTextResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,174 @@
# AWS Bedrock - Batch Inference Endpoints
batch-jobs:
post:
operationId: bedrockCreateBatchJob
summary: Create batch inference job (Bedrock format)
description: |
Creates a batch inference job using AWS Bedrock format.
tags:
- Bedrock Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/batch.yaml#/BedrockBatchJobRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/batch.yaml#/BedrockBatchJobResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
get:
operationId: bedrockListBatchJobs
summary: List batch inference jobs (Bedrock format)
description: |
Lists batch inference jobs using AWS Bedrock format.
tags:
- Bedrock Integration
parameters:
- name: maxResults
in: query
schema:
type: integer
description: Maximum number of results to return
- name: nextToken
in: query
schema:
type: string
description: Token for pagination
- name: statusEquals
in: query
schema:
type: string
enum: [Submitted, InProgress, Completed, Failed, Stopping, Stopped, PartiallyCompleted, Expired, Validating,
Scheduled]
description: Filter by status
- name: nameContains
in: query
schema:
type: string
description: Filter by job name containing this string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/batch.yaml#/BedrockBatchListResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batch-job-by-id:
get:
operationId: bedrockRetrieveBatchJob
summary: Retrieve batch inference job (Bedrock format)
description: |
Retrieves a batch inference job using AWS Bedrock format.
tags:
- Bedrock Integration
parameters:
- name: jobIdentifier
in: path
required: true
schema:
type: string
description: Job identifier
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/batch.yaml#/BedrockBatchJobResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
batch-job-cancel:
post:
operationId: bedrockCancelBatchJob
summary: Cancel batch inference job (Bedrock format)
description: |
Cancels a batch inference job using AWS Bedrock format.
tags:
- Bedrock Integration
parameters:
- name: jobIdentifier
in: path
required: true
schema:
type: string
description: Job identifier to cancel
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/batch.yaml#/BedrockBatchCancelResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,93 @@
# AWS Bedrock - Converse Endpoints
converse:
post:
operationId: bedrockConverse
summary: Converse with model (Bedrock format)
description: |
Sends messages to a model using AWS Bedrock Converse API format.
tags:
- Bedrock Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID (e.g., anthropic.claude-3-sonnet-20240229-v1:0)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
converse-stream:
post:
operationId: bedrockConverseStream
summary: Stream converse with model (Bedrock format)
description: |
Streams messages from a model using AWS Bedrock Converse API format.
tags:
- Bedrock Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID (e.g., anthropic.claude-3-sonnet-20240229-v1:0)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful streaming response
content:
application/x-amz-eventstream:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,95 @@
# AWS Bedrock - Invoke Endpoints
invoke:
post:
operationId: bedrockInvokeModel
summary: Invoke model (Bedrock format)
description: |
Invokes a model using AWS Bedrock InvokeModel API format.
Accepts raw model-specific request body.
tags:
- Bedrock Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID (e.g., anthropic.claude-3-sonnet-20240229-v1:0)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/invoke.yaml#/BedrockInvokeRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/invoke.yaml#/BedrockInvokeResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
invoke-stream:
post:
operationId: bedrockInvokeModelStream
summary: Invoke model with streaming (Bedrock format)
description: |
Invokes a model with streaming using AWS Bedrock InvokeModelWithResponseStream API format.
tags:
- Bedrock Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID (e.g., anthropic.claude-3-sonnet-20240229-v1:0)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/invoke.yaml#/BedrockInvokeRequest'
responses:
'200':
description: Successful streaming response
content:
application/x-amz-eventstream:
schema:
type: object
description: AWS event stream format
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,43 @@
# Cohere - Chat Endpoints
chat:
post:
operationId: cohereChatV2
summary: Chat with model (Cohere v2 format)
description: |
Sends a chat request using Cohere v2 API format.
tags:
- Cohere Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,40 @@
# Cohere - Embed Endpoints
embed:
post:
operationId: cohereEmbedV2
summary: Create embeddings (Cohere v2 format)
description: |
Creates embeddings using Cohere v2 API format.
tags:
- Cohere Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,40 @@
# Cohere - Tokenize Endpoints
tokenize:
post:
operationId: cohereTokenize
summary: Tokenize text (Cohere format)
description: |
Tokenizes text using Cohere v1 API format.
tags:
- Cohere Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,176 @@
# Google GenAI (Gemini) - Files Endpoints
files-upload:
post:
operationId: geminiUploadFile
summary: Upload file (Gemini format)
description: |
Uploads a file using Google Gemini API format.
This is a multipart upload with two parts:
- "metadata": JSON object containing file metadata
- "file": Binary file content
Note: Direct file content download is not supported by Gemini Files API.
Use the file.uri field from the response to access uploaded files.
tags:
- GenAI Integration
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileUploadRequest'
encoding:
metadata:
contentType: application/json
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileUploadResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
files:
get:
operationId: geminiListFiles
summary: List files (Gemini format)
description: |
Lists uploaded files in Google Gemini API format.
tags:
- GenAI Integration
parameters:
- name: pageSize
in: query
schema:
type: integer
description: Maximum number of files to return
- name: pageToken
in: query
schema:
type: string
description: Page token for pagination
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileListResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
files-by-id:
get:
operationId: geminiRetrieveFile
summary: Retrieve file (Gemini format)
description: |
Retrieves file metadata in Google Gemini API format.
Note: This endpoint returns file metadata only. Direct file content
download is not supported by Gemini Files API. Use the file.uri
field from the response to access the file content.
tags:
- GenAI Integration
parameters:
- name: file_id
in: path
required: true
schema:
type: string
description: File ID
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileRetrieveResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
delete:
operationId: geminiDeleteFile
summary: Delete file (Gemini format)
description: |
Deletes a file in Google Gemini API format.
tags:
- GenAI Integration
parameters:
- name: file_id
in: path
required: true
schema:
type: string
description: File ID to delete
responses:
'200':
description: Successful response (empty)
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/files.yaml#/GeminiFileDeleteResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,241 @@
# Google GenAI (Gemini) - Generation Endpoints
generate-content:
post:
operationId: geminiGenerateContent
summary: Generate content (Gemini format)
description: |
Generates content using Google Gemini API format.
The model is specified in the URL path.
tags:
- GenAI Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action (e.g., gemini-pro:generateContent)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
stream-generate-content:
post:
operationId: geminiStreamGenerateContent
summary: Stream generate content (Gemini format)
description: |
Streams content generation using Google Gemini API format.
The model is specified in the URL path.
tags:
- GenAI Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action (e.g., gemini-pro:streamGenerateContent)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful streaming response
content:
text/event-stream:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
embed-content:
post:
operationId: geminiEmbedContent
summary: Embed content (Gemini format)
description: |
Creates embeddings using Google Gemini API format.
tags:
- GenAI Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action (e.g., embedding-001:embedContent)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiEmbeddingRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiEmbeddingResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
count-tokens:
post:
operationId: geminiCountTokens
summary: Count tokens (Gemini format)
description: |
Counts tokens using Google Gemini API format.
tags:
- GenAI Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action (e.g., gemini-pro:countTokens)
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiCountTokensRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiCountTokensResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
image-generation:
post:
operationId: geminiGenerateImage
summary: Generate image (Gemini format)
description: |
For Imagen models, use the `:predict` suffix (e.g., `imagen-3.0-generate-001:predict`).
For Gemini models, use `:generateContent` with `generationConfig.responseModalities: ["IMAGE"]` in the request body.
tags:
- GenAI Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: |
Model name with action suffix. For Imagen models, use `:predict` (e.g., `imagen-3.0-generate-001:predict`).
For Gemini models with image generation, use `:generateContent` (e.g., `gemini-1.5-pro:generateContent`).
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: |
Successful response. Returns JSON with generated image data in `candidates[0].content.parts[0].inlineData`.
When streaming, events are sent via Server-Sent Events (SSE).
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,45 @@
# Google GenAI (Gemini) - Models Endpoints
models:
get:
operationId: geminiListModels
summary: List models (Gemini format)
description: |
Lists available models in Google Gemini API format.
tags:
- GenAI Integration
parameters:
- name: pageSize
in: query
schema:
type: integer
description: Maximum number of models to return
- name: pageToken
in: query
schema:
type: string
description: Page token for pagination
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiListModelsResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,83 @@
# LangChain - Anthropic-compatible Endpoints
# Reuses Anthropic integration schemas
messages:
post:
operationId: langchainAnthropicMessages
summary: Create message (LangChain - Anthropic format)
description: |
Creates a message using Anthropic-compatible format via LangChain.
tags:
- LangChain Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
count-tokens:
post:
operationId: langchainAnthropicCountTokens
summary: Count tokens (LangChain - Anthropic format)
description: |
Counts tokens using Anthropic-compatible format via LangChain.
tags:
- LangChain Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/count-tokens.yaml#/AnthropicCountTokensRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/count-tokens.yaml#/AnthropicCountTokensResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,94 @@
# LangChain - Bedrock-compatible Endpoints
# Reuses Bedrock integration schemas
converse:
post:
operationId: langchainBedrockConverse
summary: Converse with model (LangChain - Bedrock format)
description: |
Sends messages using AWS Bedrock Converse-compatible format via LangChain.
tags:
- LangChain Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
converse-stream:
post:
operationId: langchainBedrockConverseStream
summary: Stream converse with model (LangChain - Bedrock format)
description: |
Streams messages using AWS Bedrock Converse-compatible format via LangChain.
tags:
- LangChain Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful streaming response
content:
application/x-amz-eventstream:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,122 @@
# LangChain - Cohere-compatible Endpoints
# Reuses Cohere integration schemas
chat:
post:
operationId: langchainCohereChat
summary: Chat with model (LangChain - Cohere format)
description: |
Sends a chat request using Cohere-compatible format via LangChain.
tags:
- LangChain Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
embed:
post:
operationId: langchainCohereEmbed
summary: Create embeddings (LangChain - Cohere format)
description: |
Creates embeddings using Cohere-compatible format via LangChain.
tags:
- LangChain Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
tokenize:
post:
operationId: langchainCohereTokenize
summary: Tokenize text (LangChain - Cohere format)
description: |
Tokenizes text using Cohere-compatible format via LangChain.
tags:
- LangChain Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,138 @@
# LangChain - GenAI (Gemini) compatible Endpoints
# Reuses GenAI integration schemas
models:
get:
operationId: langchainGeminiListModels
summary: List models (LangChain - Gemini format)
description: |
Lists available models in Google Gemini API format via LangChain.
tags:
- LangChain Integration
parameters:
- name: pageSize
in: query
schema:
type: integer
description: Maximum number of models to return
- name: pageToken
in: query
schema:
type: string
description: Page token for pagination
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiListModelsResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
generate-content:
post:
operationId: langchainGeminiGenerateContent
summary: Generate content (LangChain - Gemini format)
description: |
Generates content using Google Gemini-compatible format via LangChain.
tags:
- LangChain Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
stream-generate-content:
post:
operationId: langchainGeminiStreamGenerateContent
summary: Stream generate content (LangChain - Gemini format)
description: |
Streams content generation using Google Gemini-compatible format via LangChain.
tags:
- LangChain Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful streaming response
content:
text/event-stream:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,262 @@
# LangChain - OpenAI-compatible Endpoints
# Reuses OpenAI integration schemas
text-completions:
post:
operationId: langchainOpenAITextCompletions
summary: Text completions (LangChain - OpenAI format)
description: |
Creates a text completion using OpenAI-compatible format via LangChain.
This is the legacy completions API.
tags:
- LangChain 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: langchainOpenAIChatCompletions
summary: Chat completions (LangChain - OpenAI format)
description: |
Creates a chat completion using OpenAI-compatible format via LangChain.
tags:
- LangChain 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: langchainOpenAIEmbeddings
summary: Create embeddings (LangChain - OpenAI format)
description: |
Creates embeddings using OpenAI-compatible format via LangChain.
tags:
- LangChain 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: langchainOpenAIListModels
summary: List models (LangChain - OpenAI format)
description: |
Lists available models using OpenAI-compatible format via LangChain.
tags:
- LangChain 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: langchainOpenAIResponses
summary: Create response (LangChain - OpenAI Responses API)
description: |
Creates a response using OpenAI Responses API format via LangChain.
Supports streaming via SSE.
tags:
- LangChain 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: langchainOpenAICountInputTokens
summary: Count input tokens (LangChain - OpenAI format)
description: |
Counts the number of tokens in a Responses API request via LangChain.
tags:
- LangChain 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: langchainOpenAISpeech
summary: Create speech (LangChain - OpenAI TTS)
description: |
Generates audio from text using OpenAI TTS via LangChain.
tags:
- LangChain 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: langchainOpenAITranscriptions
summary: Create transcription (LangChain - OpenAI Whisper)
description: |
Transcribes audio into text using OpenAI Whisper via LangChain.
tags:
- LangChain 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: []

View File

@@ -0,0 +1,44 @@
# LiteLLM - Anthropic-compatible Endpoints
# Reuses Anthropic integration schemas
messages:
post:
operationId: litellmAnthropicMessages
summary: Create message (LiteLLM - Anthropic format)
description: |
Creates a message using Anthropic-compatible format via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,94 @@
# LiteLLM - Bedrock-compatible Endpoints
# Reuses Bedrock integration schemas
converse:
post:
operationId: litellmBedrockConverse
summary: Converse with model (LiteLLM - Bedrock format)
description: |
Sends messages using AWS Bedrock Converse-compatible format via LiteLLM.
tags:
- LiteLLM Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
converse-stream:
post:
operationId: litellmBedrockConverseStream
summary: Stream converse with model (LiteLLM - Bedrock format)
description: |
Streams messages using AWS Bedrock Converse-compatible format via LiteLLM.
tags:
- LiteLLM Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful streaming response
content:
application/x-amz-eventstream:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,122 @@
# LiteLLM - Cohere-compatible Endpoints
# Reuses Cohere integration schemas
chat:
post:
operationId: litellmCohereChat
summary: Chat with model (LiteLLM - Cohere format)
description: |
Sends a chat request using Cohere-compatible format via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
embed:
post:
operationId: litellmCohereEmbed
summary: Create embeddings (LiteLLM - Cohere format)
description: |
Creates embeddings using Cohere-compatible format via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
tokenize:
post:
operationId: litellmCohereTokenize
summary: Tokenize text (LiteLLM - Cohere format)
description: |
Tokenizes text using Cohere-compatible format via LiteLLM.
tags:
- LiteLLM Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,138 @@
# LiteLLM - GenAI (Gemini) compatible Endpoints
# Reuses GenAI integration schemas
models:
get:
operationId: litellmGeminiListModels
summary: List models (LiteLLM - Gemini format)
description: |
Lists available models in Google Gemini API format via LiteLLM.
tags:
- LiteLLM Integration
parameters:
- name: pageSize
in: query
schema:
type: integer
description: Maximum number of models to return
- name: pageToken
in: query
schema:
type: string
description: Page token for pagination
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiListModelsResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
generate-content:
post:
operationId: litellmGeminiGenerateContent
summary: Generate content (LiteLLM - Gemini format)
description: |
Generates content using Google Gemini-compatible format via LiteLLM.
tags:
- LiteLLM Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
stream-generate-content:
post:
operationId: litellmGeminiStreamGenerateContent
summary: Stream generate content (LiteLLM - Gemini format)
description: |
Streams content generation using Google Gemini-compatible format via LiteLLM.
tags:
- LiteLLM Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful streaming response
content:
text/event-stream:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,262 @@
# 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: []

View 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: []

View 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: []

View 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: []

View 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: []

View 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: []

View 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: []

View 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: []

View 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: []

View 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: []

View 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: []

View File

@@ -0,0 +1,44 @@
# PydanticAI - Anthropic-compatible Endpoints
# Reuses Anthropic integration schemas
messages:
post:
operationId: pydanticaiAnthropicMessages
summary: Create message (PydanticAI - Anthropic format)
description: |
Creates a message using Anthropic-compatible format via PydanticAI.
tags:
- PydanticAI Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicMessageResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/anthropic/messages.yaml#/AnthropicStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/anthropic/common.yaml#/AnthropicError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,94 @@
# PydanticAI - Bedrock-compatible Endpoints
# Reuses Bedrock integration schemas
converse:
post:
operationId: pydanticaiBedrockConverse
summary: Converse with model (PydanticAI - Bedrock format)
description: |
Sends messages using AWS Bedrock Converse-compatible format via PydanticAI.
tags:
- PydanticAI Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
converse-stream:
post:
operationId: pydanticaiBedrockConverseStream
summary: Stream converse with model (PydanticAI - Bedrock format)
description: |
Streams messages using AWS Bedrock Converse-compatible format via PydanticAI.
tags:
- PydanticAI Integration
parameters:
- name: modelId
in: path
required: true
schema:
type: string
description: Model ID
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockConverseRequest'
responses:
'200':
description: Successful streaming response
content:
application/x-amz-eventstream:
schema:
$ref: '../../../schemas/integrations/bedrock/converse.yaml#/BedrockStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/bedrock/common.yaml#/BedrockError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,122 @@
# PydanticAI - Cohere-compatible Endpoints
# Reuses Cohere integration schemas
chat:
post:
operationId: pydanticaiCohereChat
summary: Chat with model (PydanticAI - Cohere format)
description: |
Sends a chat request using Cohere-compatible format via PydanticAI.
tags:
- PydanticAI Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatResponse'
text/event-stream:
schema:
$ref: '../../../schemas/integrations/cohere/chat.yaml#/CohereChatStreamEvent'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
embed:
post:
operationId: pydanticaiCohereEmbed
summary: Create embeddings (PydanticAI - Cohere format)
description: |
Creates embeddings using Cohere-compatible format via PydanticAI.
tags:
- PydanticAI Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/embed.yaml#/CohereEmbeddingResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
tokenize:
post:
operationId: pydanticaiCohereTokenize
summary: Tokenize text (PydanticAI - Cohere format)
description: |
Tokenizes text using Cohere v1 API format via PydanticAI.
tags:
- PydanticAI Integration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/tokenize.yaml#/CohereCountTokensResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/cohere/common.yaml#/CohereError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,138 @@
# PydanticAI - GenAI (Gemini) compatible Endpoints
# Reuses GenAI integration schemas
models:
get:
operationId: pydanticaiGeminiListModels
summary: List models (PydanticAI - Gemini format)
description: |
Lists available models in Google Gemini API format via PydanticAI.
tags:
- PydanticAI Integration
parameters:
- name: pageSize
in: query
schema:
type: integer
description: Maximum number of models to return
- name: pageToken
in: query
schema:
type: string
description: Page token for pagination
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiListModelsResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
generate-content:
post:
operationId: pydanticaiGeminiGenerateContent
summary: Generate content (PydanticAI - Gemini format)
description: |
Generates content using Google Gemini-compatible format via PydanticAI.
tags:
- PydanticAI Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
stream-generate-content:
post:
operationId: pydanticaiGeminiStreamGenerateContent
summary: Stream generate content (PydanticAI - Gemini format)
description: |
Streams content generation using Google Gemini-compatible format via PydanticAI.
tags:
- PydanticAI Integration
parameters:
- name: model
in: path
required: true
schema:
type: string
description: Model name with action
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationRequest'
responses:
'200':
description: Successful streaming response
content:
text/event-stream:
schema:
$ref: '../../../schemas/integrations/genai/generation.yaml#/GeminiGenerationResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '../../../schemas/integrations/genai/common.yaml#/GeminiError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []

View File

@@ -0,0 +1,262 @@
# 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: []

View File

@@ -0,0 +1,51 @@
clear-by-request-id:
delete:
operationId: clearCacheByRequestId
summary: Clear cache by request ID
description: Clears cache entries associated with a specific request ID.
tags:
- Cache
parameters:
- name: requestId
in: path
required: true
description: Request ID to clear cache for
schema:
type: string
responses:
'200':
description: Cache cleared successfully
content:
application/json:
schema:
$ref: '../../schemas/management/cache.yaml#/ClearCacheResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
clear-by-cache-key:
delete:
operationId: clearCacheByCacheKey
summary: Clear cache by cache key
description: Clears a cache entry by its direct cache key.
tags:
- Cache
parameters:
- name: cacheKey
in: path
required: true
description: Cache key to clear
schema:
type: string
responses:
'200':
description: Cache cleared successfully
content:
application/json:
schema:
$ref: '../../schemas/management/cache.yaml#/ClearCacheResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'

View File

@@ -0,0 +1,136 @@
config:
get:
operationId: getConfig
summary: Get configuration
description: |
Retrieves the current Bifrost configuration including client config, framework config,
auth config, and connection status for various stores.
tags:
- Configuration
parameters:
- name: from_db
in: query
description: If true, fetch configuration directly from the database
schema:
type: string
enum: ["true", "false"]
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/config.yaml#/GetConfigResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updateConfig
summary: Update configuration
description: |
Updates the Bifrost configuration. Supports hot-reloading of certain settings
like drop_excess_requests. Some settings may require a restart to take effect.
tags:
- Configuration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/config.yaml#/UpdateConfigRequest'
responses:
'200':
description: Configuration updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
version:
get:
operationId: getVersion
summary: Get version
description: Returns the current Bifrost version information.
tags:
- Configuration
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/config.yaml#/Version'
proxy-config:
get:
operationId: getProxyConfig
summary: Get proxy configuration
description: Retrieves the current global proxy configuration.
tags:
- Configuration
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/config.yaml#/ProxyConfig'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
'503':
description: Config store not available
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
put:
operationId: updateProxyConfig
summary: Update proxy configuration
description: Updates the global proxy configuration.
tags:
- Configuration
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/config.yaml#/ProxyConfig'
responses:
'200':
description: Proxy configuration updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
force-sync-pricing:
post:
operationId: forceSyncPricing
summary: Force pricing sync
description: Triggers an immediate pricing sync and resets the pricing sync timer.
tags:
- Configuration
responses:
'200':
description: Pricing sync triggered successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
'503':
description: Config store not available
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
health:
get:
operationId: getHealth
summary: Health check
description: |
Returns the health status of the Bifrost server. Checks connectivity to config store,
log store, and vector store if configured.
tags:
- Health
responses:
'200':
description: Server is healthy
content:
application/json:
schema:
$ref: '../../schemas/management/health.yaml#/HealthResponse'
'503':
description: Service unavailable
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'

View File

@@ -0,0 +1,122 @@
# Infrastructure endpoints (WebSocket, MCP Server, Metrics)
websocket:
get:
operationId: websocketConnect
summary: WebSocket connection
description: |
Upgrades to a WebSocket connection for real-time updates.
Server pushes log events, MCP log events, and store update notifications.
Heartbeat pings are sent every 30 seconds.
tags:
- Infrastructure
responses:
'101':
description: WebSocket upgrade successful
mcp-server:
post:
operationId: mcpServerMessage
summary: MCP protocol message
description: |
Receives a JSON-RPC 2.0 message for the MCP protocol server.
Returns a JSON-RPC 2.0 response, or null for notifications.
tags:
- Infrastructure
requestBody:
required: true
content:
application/json:
schema:
type: object
description: JSON-RPC 2.0 request
properties:
jsonrpc:
type: string
enum: ["2.0"]
method:
type: string
params:
type: object
id:
oneOf:
- type: string
- type: integer
responses:
'200':
description: JSON-RPC 2.0 response
content:
application/json:
schema:
type: object
properties:
jsonrpc:
type: string
enum: ["2.0"]
result:
type: object
error:
type: object
properties:
code:
type: integer
message:
type: string
id:
oneOf:
- type: string
- type: integer
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
get:
operationId: mcpServerSSE
summary: MCP protocol SSE stream
description: |
Opens a Server-Sent Events stream for the MCP protocol server.
Returns `Content-Type: text/event-stream`.
tags:
- Infrastructure
responses:
'200':
description: SSE stream opened
content:
text/event-stream:
schema:
type: string
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
metrics:
get:
operationId: getMetrics
summary: Prometheus metrics
description: Returns Prometheus-formatted metrics for monitoring.
tags:
- Infrastructure
responses:
'200':
description: Prometheus metrics
content:
text/plain:
schema:
type: string
websocket-responses:
get:
operationId: websocketResponses
summary: WebSocket Responses API
description: |
Upgrades to a WebSocket connection for the streaming Responses API.
Clients send `response.create` events and receive streaming response events.
Supports authentication via Bearer token, x-api-key, or x-bf-vk headers.
tags:
- Infrastructure
responses:
'101':
description: WebSocket upgrade successful

View File

@@ -0,0 +1,997 @@
logs:
get:
operationId: getLogs
summary: Get logs
description: |
Retrieves logs with filtering, search, and pagination via query parameters.
tags:
- Logging
parameters:
- name: providers
in: query
description: Comma-separated list of providers to filter by
schema:
type: string
- name: models
in: query
description: Comma-separated list of models to filter by
schema:
type: string
- name: status
in: query
description: Comma-separated list of statuses to filter by
schema:
type: string
- name: objects
in: query
description: Comma-separated list of object types to filter by
schema:
type: string
- name: selected_key_ids
in: query
description: Comma-separated list of selected key IDs to filter by
schema:
type: string
- name: virtual_key_ids
in: query
description: Comma-separated list of virtual key IDs to filter by
schema:
type: string
- name: routing_rule_ids
in: query
description: Comma-separated list of routing rule IDs to filter by
schema:
type: string
- name: routing_engine_used
in: query
description: Comma-separated list of routing engines to filter by (routing-rule, governance, or loadbalancing)
schema:
type: string
- name: start_time
in: query
description: Start time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: end_time
in: query
description: End time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: min_latency
in: query
description: Minimum latency filter
schema:
type: number
- name: max_latency
in: query
description: Maximum latency filter
schema:
type: number
- name: min_tokens
in: query
description: Minimum tokens filter
schema:
type: integer
- name: max_tokens
in: query
description: Maximum tokens filter
schema:
type: integer
- name: min_cost
in: query
description: Minimum cost filter
schema:
type: number
- name: max_cost
in: query
description: Maximum cost filter
schema:
type: number
- name: missing_cost_only
in: query
description: Only show logs with missing cost
schema:
type: boolean
- name: content_search
in: query
description: Search in request/response content
schema:
type: string
- name: limit
in: query
description: Number of logs to return (default 50, max 1000)
schema:
type: integer
default: 50
maximum: 1000
- name: offset
in: query
description: Number of logs to skip
schema:
type: integer
default: 0
- name: sort_by
in: query
description: Field to sort by
schema:
type: string
enum: [timestamp, latency, tokens, cost]
default: timestamp
- name: order
in: query
description: Sort order
schema:
type: string
enum: [asc, desc]
default: desc
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/SearchLogsResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deleteLogs
summary: Delete logs
description: Deletes logs by their IDs.
tags:
- Logging
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/DeleteLogsRequest'
responses:
'200':
description: Logs deleted successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-stats:
get:
operationId: getLogsStats
summary: Get log statistics
description: Returns statistics for logs matching the specified filters.
tags:
- Logging
parameters:
- name: providers
in: query
description: Comma-separated list of providers to filter by
schema:
type: string
- name: models
in: query
description: Comma-separated list of models to filter by
schema:
type: string
- name: status
in: query
description: Comma-separated list of statuses to filter by
schema:
type: string
- name: objects
in: query
description: Comma-separated list of object types to filter by
schema:
type: string
- name: selected_key_ids
in: query
description: Comma-separated list of selected key IDs to filter by
schema:
type: string
- name: virtual_key_ids
in: query
description: Comma-separated list of virtual key IDs to filter by
schema:
type: string
- name: routing_rule_ids
in: query
description: Comma-separated list of routing rule IDs to filter by
schema:
type: string
- name: routing_engine_used
in: query
description: Comma-separated list of routing engines to filter by (routing-rule, governance, or loadbalancing)
schema:
type: string
- name: start_time
in: query
description: Start time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: end_time
in: query
description: End time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: min_latency
in: query
description: Minimum latency filter
schema:
type: number
- name: max_latency
in: query
description: Maximum latency filter
schema:
type: number
- name: min_tokens
in: query
description: Minimum tokens filter
schema:
type: integer
- name: max_tokens
in: query
description: Maximum tokens filter
schema:
type: integer
- name: min_cost
in: query
description: Minimum cost filter
schema:
type: number
- name: max_cost
in: query
description: Maximum cost filter
schema:
type: number
- name: missing_cost_only
in: query
description: Only show logs with missing cost
schema:
type: boolean
- name: content_search
in: query
description: Search in request/response content
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/LogStats'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-dropped:
get:
operationId: getDroppedRequests
summary: Get dropped requests count
description: Returns the number of dropped requests.
tags:
- Logging
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/DroppedRequestsResponse'
logs-filterdata:
get:
operationId: getAvailableFilterData
summary: Get available filter data
description: Returns all unique filter data from logs (models, keys, virtual keys).
tags:
- Logging
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/FilterDataResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-by-id:
get:
operationId: getLogById
summary: Get a single log entry
description: Retrieves a single log entry by its ID.
tags:
- Logging
parameters:
- name: id
in: path
required: true
description: Log entry ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/LogEntry'
'404':
description: Log not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram:
get:
operationId: getLogsHistogram
summary: Get request count histogram
description: |
Returns time-bucketed request counts. Bucket size is auto-calculated from the time range.
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/HistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram-tokens:
get:
operationId: getLogsTokenHistogram
summary: Get token usage histogram
description: Returns time-bucketed token usage (prompt, completion, total).
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/TokenHistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram-cost:
get:
operationId: getLogsCostHistogram
summary: Get cost histogram
description: Returns time-bucketed cost data with model breakdown.
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/CostHistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram-models:
get:
operationId: getLogsModelHistogram
summary: Get model usage histogram
description: Returns time-bucketed model usage with success/error breakdown.
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/ModelHistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram-latency:
get:
operationId: getLogsLatencyHistogram
summary: Get latency histogram
description: Returns time-bucketed latency percentiles (avg, p90, p95, p99).
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/LatencyHistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram-cost-by-provider:
get:
operationId: getLogsProviderCostHistogram
summary: Get cost histogram by provider
description: Returns time-bucketed cost data with provider breakdown.
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/ProviderCostHistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram-tokens-by-provider:
get:
operationId: getLogsProviderTokenHistogram
summary: Get token histogram by provider
description: Returns time-bucketed token usage with provider breakdown.
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/ProviderTokenHistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logs-histogram-latency-by-provider:
get:
operationId: getLogsProviderLatencyHistogram
summary: Get latency histogram by provider
description: Returns time-bucketed latency percentiles with provider breakdown.
tags:
- Logging
parameters:
- $ref: '#/_histogram-parameters/providers'
- $ref: '#/_histogram-parameters/models'
- $ref: '#/_histogram-parameters/status'
- $ref: '#/_histogram-parameters/objects'
- $ref: '#/_histogram-parameters/selected_key_ids'
- $ref: '#/_histogram-parameters/virtual_key_ids'
- $ref: '#/_histogram-parameters/routing_rule_ids'
- $ref: '#/_histogram-parameters/routing_engine_used'
- $ref: '#/_histogram-parameters/start_time'
- $ref: '#/_histogram-parameters/end_time'
- $ref: '#/_histogram-parameters/min_latency'
- $ref: '#/_histogram-parameters/max_latency'
- $ref: '#/_histogram-parameters/min_tokens'
- $ref: '#/_histogram-parameters/max_tokens'
- $ref: '#/_histogram-parameters/min_cost'
- $ref: '#/_histogram-parameters/max_cost'
- $ref: '#/_histogram-parameters/missing_cost_only'
- $ref: '#/_histogram-parameters/content_search'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/ProviderLatencyHistogramResult'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
# Shared histogram filter parameters
_histogram-parameters:
providers:
name: providers
in: query
description: Comma-separated list of providers to filter by
schema:
type: string
models:
name: models
in: query
description: Comma-separated list of models to filter by
schema:
type: string
status:
name: status
in: query
description: Comma-separated list of statuses to filter by
schema:
type: string
objects:
name: objects
in: query
description: Comma-separated list of object types to filter by
schema:
type: string
selected_key_ids:
name: selected_key_ids
in: query
description: Comma-separated list of selected key IDs to filter by
schema:
type: string
virtual_key_ids:
name: virtual_key_ids
in: query
description: Comma-separated list of virtual key IDs to filter by
schema:
type: string
routing_rule_ids:
name: routing_rule_ids
in: query
description: Comma-separated list of routing rule IDs to filter by
schema:
type: string
routing_engine_used:
name: routing_engine_used
in: query
description: Comma-separated list of routing engines to filter by
schema:
type: string
start_time:
name: start_time
in: query
description: Start time filter (RFC3339 format)
schema:
type: string
format: date-time
end_time:
name: end_time
in: query
description: End time filter (RFC3339 format)
schema:
type: string
format: date-time
min_latency:
name: min_latency
in: query
description: Minimum latency filter
schema:
type: number
max_latency:
name: max_latency
in: query
description: Maximum latency filter
schema:
type: number
min_tokens:
name: min_tokens
in: query
description: Minimum tokens filter
schema:
type: integer
max_tokens:
name: max_tokens
in: query
description: Maximum tokens filter
schema:
type: integer
min_cost:
name: min_cost
in: query
description: Minimum cost filter
schema:
type: number
max_cost:
name: max_cost
in: query
description: Maximum cost filter
schema:
type: number
missing_cost_only:
name: missing_cost_only
in: query
description: Only show logs with missing cost
schema:
type: boolean
content_search:
name: content_search
in: query
description: Search in request/response content
schema:
type: string
logs-recalculate-cost:
post:
operationId: recalculateLogCosts
summary: Recalculate log costs
description: |
Recomputes missing costs in batches. Processes logs with missing cost values
and updates them based on current pricing data.
tags:
- Logging
requestBody:
required: false
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/RecalculateCostRequest'
responses:
'200':
description: Costs recalculated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/RecalculateCostResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
mcp-logs:
get:
operationId: getMCPLogs
summary: Get MCP tool logs
description: |
Retrieves MCP tool execution logs with filtering, search, and pagination via query parameters.
tags:
- Logging
parameters:
- name: tool_names
in: query
description: Comma-separated list of tool names to filter by
schema:
type: string
- name: server_labels
in: query
description: Comma-separated list of server labels to filter by
schema:
type: string
- name: status
in: query
description: Comma-separated list of statuses to filter by (processing, success, error)
schema:
type: string
enum: [processing, success, error]
- name: virtual_key_ids
in: query
description: Comma-separated list of virtual key IDs to filter by
schema:
type: string
- name: llm_request_ids
in: query
description: Comma-separated list of LLM request IDs to filter by
schema:
type: string
- name: start_time
in: query
description: Start time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: end_time
in: query
description: End time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: min_latency
in: query
description: Minimum latency filter (milliseconds)
schema:
type: number
- name: max_latency
in: query
description: Maximum latency filter (milliseconds)
schema:
type: number
- name: content_search
in: query
description: Search in tool arguments and results
schema:
type: string
- name: limit
in: query
description: Number of logs to return (default 50, max 1000)
schema:
type: integer
default: 50
maximum: 1000
- name: offset
in: query
description: Number of logs to skip
schema:
type: integer
default: 0
- name: sort_by
in: query
description: Field to sort by
schema:
type: string
enum: [timestamp, latency, cost]
default: timestamp
- name: order
in: query
description: Sort order
schema:
type: string
enum: [asc, desc]
default: desc
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/SearchMCPLogsResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deleteMCPLogs
summary: Delete MCP tool logs
description: Deletes MCP tool logs by their IDs.
tags:
- Logging
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/DeleteMCPLogsRequest'
responses:
'200':
description: MCP tool logs deleted successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
mcp-logs-stats:
get:
operationId: getMCPLogsStats
summary: Get MCP tool log statistics
description: Returns statistics for MCP tool logs matching the specified filters.
tags:
- Logging
parameters:
- name: tool_names
in: query
description: Comma-separated list of tool names to filter by
schema:
type: string
- name: server_labels
in: query
description: Comma-separated list of server labels to filter by
schema:
type: string
- name: status
in: query
description: Comma-separated list of statuses to filter by
schema:
type: string
enum: [processing, success, error]
- name: virtual_key_ids
in: query
description: Comma-separated list of virtual key IDs to filter by
schema:
type: string
- name: llm_request_ids
in: query
description: Comma-separated list of LLM request IDs to filter by
schema:
type: string
- name: start_time
in: query
description: Start time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: end_time
in: query
description: End time filter (RFC3339 format)
schema:
type: string
format: date-time
- name: min_latency
in: query
description: Minimum latency filter
schema:
type: number
- name: max_latency
in: query
description: Maximum latency filter
schema:
type: number
- name: content_search
in: query
description: Search in tool arguments and results
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/MCPToolLogStats'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
mcp-logs-filterdata:
get:
operationId: getMCPLogsFilterData
summary: Get available MCP log filter data
description: Returns all unique filter data from MCP tool logs (tool names, server labels).
tags:
- Logging
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/logging.yaml#/MCPLogsFilterDataResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'

View File

@@ -0,0 +1,240 @@
execute-tool:
post:
operationId: executeMCPTool
summary: Execute MCP tool
description: Executes an MCP tool and returns the result.
tags:
- MCP
parameters:
- name: format
in: query
required: false
description: |
Format of the tool execution request/response.
schema:
type: string
enum: [chat, responses]
default: chat
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/mcp.yaml#/ExecuteToolRequest'
examples:
chat:
summary: Chat format example
value:
id: "call_123"
type: "function"
function:
name: "get_weather"
arguments: '{"location": "San Francisco"}'
responses:
summary: Responses format example
value:
call_id: "call_123"
name: "get_weather"
arguments: '{"location": "San Francisco"}'
responses:
'200':
description: Tool executed successfully
content:
application/json:
schema:
$ref: '../../schemas/management/mcp.yaml#/ExecuteToolResponse'
examples:
chat:
summary: Chat format response
value:
name: "get_weather"
role: "tool"
tool_call_id: "call_123"
content: "The weather in San Francisco is 72°F and sunny."
responses:
summary: Responses format response
value:
id: "msg_123"
type: "function_call_output"
status: "completed"
role: "assistant"
call_id: "call_123"
name: "get_weather"
arguments: '{"location": "San Francisco"}'
content: "The weather in San Francisco is 72°F and sunny."
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
security:
- BearerAuth: []
- BasicAuth: []
- VirtualKeyAuth: []
- ApiKeyAuth: []
clients:
get:
operationId: getMCPClients
summary: List MCP clients
description: Returns a list of all configured MCP clients with their tools and connection state.
tags:
- MCP
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: '../../schemas/management/mcp.yaml#/MCPClient'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
client:
post:
operationId: addMCPClient
summary: Add MCP client
description: |
Adds a new MCP client with the specified configuration.
Note: tool_pricing is not available when creating a new client as tools are fetched after client creation.
tags:
- MCP
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/mcp.yaml#/MCPClientCreateRequest'
responses:
'200':
description: MCP client added successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
client-by-id:
put:
operationId: editMCPClient
summary: Edit MCP client
description: |
Updates an existing MCP client's configuration.
Unlike client creation, tool_pricing can be included to set per-tool execution costs since tools are already fetched.
Optionally provide vk_configs to manage which virtual keys have access to this MCP server and with which tools. When provided, this fully replaces all existing VK assignments in a single atomic transaction.
tags:
- MCP
parameters:
- name: id
in: path
required: true
description: MCP client ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/mcp.yaml#/MCPClientUpdateRequest'
responses:
'200':
description: MCP client updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: removeMCPClient
summary: Remove MCP client
description: Removes an MCP client from the configuration.
tags:
- MCP
parameters:
- name: id
in: path
required: true
description: MCP client ID
schema:
type: string
responses:
'200':
description: MCP client removed successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
client-reconnect:
post:
operationId: reconnectMCPClient
summary: Reconnect MCP client
description: Reconnects an MCP client that is in an error or disconnected state.
tags:
- MCP
parameters:
- name: id
in: path
required: true
description: MCP client ID
schema:
type: string
responses:
'200':
description: MCP client reconnected successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
client-complete-oauth:
post:
operationId: completeMCPClientOAuth
summary: Complete MCP client OAuth flow
description: |
Completes the OAuth flow for an MCP client after the user has authorized the request.
This endpoint should be called after the OAuth provider redirects back to the callback endpoint
and the OAuth token has been stored. It retrieves the pending MCP client configuration and
establishes the connection with the OAuth-provided credentials.
tags:
- MCP
- OAuth
parameters:
- name: id
in: path
required: true
description: MCP client ID
schema:
type: string
responses:
'200':
description: MCP client connected successfully with OAuth
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'400':
description: OAuth not authorized yet or MCP client not found in pending OAuth clients
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: MCP client not found in pending OAuth clients or OAuth config not found
$ref: '../../openapi.yaml#/components/responses/NotFound'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'

View File

@@ -0,0 +1,769 @@
oauth-callback:
get:
operationId: handleOAuthCallback
summary: OAuth callback endpoint
description: |
Handles the OAuth provider callback after user authorization.
This endpoint processes the authorization code and exchanges it for an access token.
On success, displays an HTML page that closes the authorization window.
tags:
- OAuth
parameters:
- name: state
in: query
required: true
description: State parameter for OAuth security (CSRF protection)
schema:
type: string
- name: code
in: query
required: true
description: Authorization code from the OAuth provider
schema:
type: string
- name: error
in: query
required: false
description: Error code if authorization failed
schema:
type: string
- name: error_description
in: query
required: false
description: Error description if authorization failed
schema:
type: string
responses:
'200':
description: OAuth authorization successful. Returns HTML page that closes the authorization window.
content:
text/html:
schema:
type: string
'400':
description: OAuth authorization failed or missing required parameters
content:
text/html:
schema:
type: string
oauth-config-status:
get:
operationId: getOAuthConfigStatus
summary: Get OAuth config status
description: |
Retrieves the current status of an OAuth configuration.
Shows whether the OAuth flow is pending, authorized, or failed,
and includes token expiration and scopes if authorized.
tags:
- OAuth
parameters:
- name: id
in: path
required: true
description: OAuth config ID
schema:
type: string
responses:
'200':
description: OAuth config status retrieved successfully
content:
application/json:
schema:
$ref: '../../schemas/management/oauth.yaml#/OAuthConfigStatus'
'404':
description: OAuth config not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: revokeOAuthConfig
summary: Revoke OAuth config
description: |
Revokes an OAuth configuration and its associated access token.
After revocation, the MCP client will no longer be able to use this OAuth token.
tags:
- OAuth
parameters:
- name: id
in: path
required: true
description: OAuth config ID
schema:
type: string
responses:
'200':
description: OAuth token revoked successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/SuccessResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
# ─── Per-User OAuth 2.1 Authorization Server ───────────────────────────────
# These endpoints implement RFC 7591 (dynamic registration), RFC 7636 (PKCE),
# and the OAuth 2.1 authorization code flow. MCP clients use them automatically
# when connecting to Bifrost's /mcp endpoint. Only active when at least one MCP
# client is configured with auth_type: per_user_oauth.
per-user-oauth-register:
post:
operationId: registerPerUserOAuthClient
summary: Register OAuth client (RFC 7591)
description: |
Dynamic Client Registration per RFC 7591. MCP clients (Claude Code, Cursor, etc.)
call this endpoint to obtain a `client_id` before initiating the authorization flow.
This endpoint is only available when at least one MCP client is configured with
`auth_type: per_user_oauth`. Returns `404` otherwise.
Authentication is not required — this is part of the unauthenticated OAuth bootstrap flow.
tags:
- OAuth
- Per-User OAuth
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/oauth.yaml#/PerUserOAuthClientRegistrationRequest'
example:
client_name: "Claude Code"
redirect_uris: ["http://localhost:54321/callback"]
grant_types: ["authorization_code"]
response_types: ["code"]
token_endpoint_auth_method: "none"
responses:
'201':
description: Client registered successfully
content:
application/json:
schema:
$ref: '../../schemas/management/oauth.yaml#/PerUserOAuthClientRegistrationResponse'
example:
client_id: "550e8400-e29b-41d4-a716-446655440000"
client_name: "Claude Code"
redirect_uris: ["http://localhost:54321/callback"]
grant_types: ["authorization_code"]
token_endpoint_auth_method: "none"
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: No per-user OAuth MCP clients configured
content:
text/plain:
schema:
type: string
'503':
description: Config store is disabled
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
per-user-oauth-authorize:
get:
operationId: authorizePerUserOAuth
summary: Authorization endpoint (OAuth 2.1)
description: |
OAuth 2.1 authorization endpoint. Validates the request parameters, creates a
browser-bound `PendingFlow` record (15-minute TTL), and redirects the user to
the Bifrost consent screen at `/oauth/consent?flow_id=xxx`.
**PKCE is required** — `code_challenge` and `code_challenge_method=S256` must
be provided. Plain code challenges are not supported.
A `__bifrost_flow_secret` HttpOnly SameSite=Lax cookie is set on redirect to
bind the consent flow to the initiating browser session (CSRF protection).
Authentication is not required — this is part of the unauthenticated OAuth bootstrap flow.
tags:
- OAuth
- Per-User OAuth
parameters:
- name: response_type
in: query
required: true
description: Must be `code`
schema:
type: string
enum: [code]
- name: client_id
in: query
required: true
description: Client ID obtained from the registration endpoint
schema:
type: string
- name: redirect_uri
in: query
required: true
description: Must match a URI registered for this client
schema:
type: string
- name: code_challenge
in: query
required: true
description: PKCE code challenge (Base64URL-encoded SHA-256 of the code verifier)
schema:
type: string
- name: code_challenge_method
in: query
required: true
description: Must be `S256`
schema:
type: string
enum: [S256]
- name: state
in: query
required: false
description: Opaque value to maintain state between request and callback (CSRF protection)
schema:
type: string
responses:
'302':
description: Redirect to consent screen at `/oauth/consent?flow_id=xxx`
headers:
Location:
schema:
type: string
description: URL of the consent screen
Set-Cookie:
schema:
type: string
description: "`__bifrost_flow_secret` HttpOnly SameSite=Lax cookie for browser binding"
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: No per-user OAuth MCP clients configured, or unknown client_id
content:
text/plain:
schema:
type: string
'503':
description: Config store is disabled
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
per-user-oauth-token:
post:
operationId: exchangePerUserOAuthToken
summary: Token endpoint (OAuth 2.1)
description: |
OAuth 2.1 token endpoint. Exchanges a single-use authorization code (5-minute TTL)
for a Bifrost-issued access token (24-hour TTL) using PKCE verification.
The request body must be `application/x-www-form-urlencoded`.
The returned `access_token` is the Bearer token to use on subsequent `/mcp` requests.
It carries the user's upstream service tokens (Notion, GitHub, etc.) linked to their
identity (Virtual Key or User ID) from the consent flow.
Authentication is not required — this is part of the unauthenticated OAuth bootstrap flow.
tags:
- OAuth
- Per-User OAuth
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- grant_type
- code
- code_verifier
properties:
grant_type:
type: string
description: Must be `authorization_code`
enum: [authorization_code]
code:
type: string
description: Authorization code received in the redirect callback
redirect_uri:
type: string
description: Must match the redirect_uri used in the authorize request (if provided)
client_id:
type: string
description: Client ID (optional — code is already bound to the client)
code_verifier:
type: string
description: PKCE code verifier — the raw secret whose SHA-256 matches the code_challenge
responses:
'200':
description: Token issued successfully
content:
application/json:
schema:
$ref: '../../schemas/management/oauth.yaml#/PerUserOAuthTokenResponse'
example:
access_token: "abc123xyz..."
token_type: "Bearer"
expires_in: 86400
scope: "mcp:read mcp:write"
'400':
description: Invalid grant, expired code, PKCE failure, or unsupported grant type
content:
application/json:
schema:
type: object
properties:
error:
type: string
enum: [invalid_grant, invalid_request, unsupported_grant_type]
error_description:
type: string
'404':
description: No per-user OAuth MCP clients configured
content:
text/plain:
schema:
type: string
'500':
description: Server error or session creation failed
content:
application/json:
schema:
type: object
properties:
error:
type: string
enum: [server_error]
error_description:
type: string
per-user-oauth-upstream-authorize:
get:
operationId: authorizeUpstreamPerUserOAuth
summary: Upstream OAuth proxy — authorize with upstream service
description: |
Initiates an OAuth flow with an upstream MCP service (Notion, GitHub, etc.)
on behalf of the current user. Used during the consent flow (via "Connect" buttons
on the MCPs page) and at runtime when a tool call is made to an unauthenticated service.
**Consent flow** — provide `flow_id` (from the pending consent flow). The browser-binding
cookie (`__bifrost_flow_secret`) is validated.
**Runtime flow** — provide `session` (the Bifrost session ID from the token endpoint).
Used when a service was skipped during consent and needs to be connected later.
On success, redirects the user to the upstream provider's authorize URL. After the user
grants access, the upstream callback lands at `/api/oauth/callback`, stores the upstream
token against the user's identity, and redirects back to the consent screen (consent flow)
or returns an authorization success page (runtime flow).
Authentication is not required — cookie/session validation is performed instead.
tags:
- OAuth
- Per-User OAuth
parameters:
- name: mcp_client_id
in: query
required: true
description: ID of the per-user OAuth MCP client to authenticate with
schema:
type: string
- name: flow_id
in: query
required: false
description: |
Pending consent flow ID. Required if `session` is not provided.
The `__bifrost_flow_secret` cookie must be present and match the flow.
schema:
type: string
- name: session
in: query
required: false
description: |
Bifrost session ID (from the token endpoint). Required if `flow_id` is not provided.
Used for runtime (post-consent) upstream authorization.
schema:
type: string
responses:
'302':
description: Redirect to upstream OAuth provider's authorize URL
headers:
Location:
schema:
type: string
description: Upstream provider authorization URL with PKCE parameters
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'401':
description: Invalid or expired flow/session
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'403':
description: Browser-binding cookie mismatch (CSRF protection)
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'404':
description: MCP client not found or not configured for per-user OAuth
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'503':
description: Config store is disabled
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
# ─── Per-User OAuth Consent Flow (browser UI) ──────────────────────────────
# These endpoints serve HTML pages and handle form submissions for the
# multi-step consent flow. They are browser-facing, not JSON API endpoints.
# All endpoints validate the __bifrost_flow_secret browser-binding cookie.
consent-identity-page:
get:
operationId: getConsentIdentityPage
summary: Consent identity selection page
description: |
Renders the identity selection screen where the user chooses how to identify
themselves for the session: Virtual Key, User ID, or Skip (session-only auth).
The `__bifrost_flow_secret` HttpOnly cookie set during `/api/oauth/per-user/authorize`
must be present — it binds the consent flow to the initiating browser.
The Skip option is only shown when `enforce_auth_on_inference` is `false` in config.
tags:
- Per-User OAuth
- Consent Flow
parameters:
- name: flow_id
in: query
required: true
description: Pending flow ID from the authorize redirect
schema:
type: string
- name: error
in: query
required: false
description: Error message to display (used on redirect-back from failed form submissions)
schema:
type: string
responses:
'200':
description: Identity selection HTML page
content:
text/html:
schema:
type: string
'400':
description: Missing or expired flow_id
content:
text/plain:
schema:
type: string
'403':
description: Browser-binding cookie mismatch
content:
text/plain:
schema:
type: string
consent-mcps-page:
get:
operationId: getConsentMCPsPage
summary: Consent MCP services page
description: |
Renders the MCP services connection screen. Shows all per-user OAuth MCP servers
available on the user's Virtual Key (or all servers if no VK was selected).
Each service shows a "Connect" link or a "Connected ✓" badge.
Requires the `__bifrost_flow_secret` browser-binding cookie.
tags:
- Per-User OAuth
- Consent Flow
parameters:
- name: flow_id
in: query
required: true
description: Pending flow ID
schema:
type: string
responses:
'200':
description: MCP services connection HTML page
content:
text/html:
schema:
type: string
'400':
description: Missing or expired flow_id
content:
text/plain:
schema:
type: string
'403':
description: Browser-binding cookie mismatch
content:
text/plain:
schema:
type: string
consent-submit-vk:
post:
operationId: submitConsentVirtualKey
summary: Submit Virtual Key identity
description: |
Validates the submitted Virtual Key and links it to the pending flow as the user's
identity. On success, redirects to the MCPs page. On failure, redirects back to the
identity page with an error message.
Request body is `application/x-www-form-urlencoded` (browser form submission).
tags:
- Per-User OAuth
- Consent Flow
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required: [flow_id, vk]
properties:
flow_id:
type: string
description: Pending flow ID
vk:
type: string
description: Virtual Key value (validated against the database)
responses:
'302':
description: |
Redirect to `/oauth/consent/mcps?flow_id=xxx` on success, or back to
`/oauth/consent?flow_id=xxx&error=...` on failure.
headers:
Location:
schema:
type: string
consent-submit-user-id:
post:
operationId: submitConsentUserID
summary: Submit User ID identity
description: |
Links a self-declared User ID to the pending flow as the user's identity.
On success, redirects to the MCPs page.
The User ID is self-declared with no server-side verification — it matches
the trust model of the `X-Bf-User-Id` header in the LLM Gateway path.
Request body is `application/x-www-form-urlencoded` (browser form submission).
tags:
- Per-User OAuth
- Consent Flow
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required: [flow_id, user_id]
properties:
flow_id:
type: string
description: Pending flow ID
user_id:
type: string
description: Self-declared user identifier (max 255 characters)
responses:
'302':
description: |
Redirect to `/oauth/consent/mcps?flow_id=xxx` on success, or back to
`/oauth/consent?flow_id=xxx&error=...` on failure.
headers:
Location:
schema:
type: string
consent-skip:
post:
operationId: skipConsentIdentity
summary: Skip identity selection
description: |
Skips identity selection and proceeds directly to the MCPs page. Upstream service
tokens will be stored against the session token only (not a persistent identity),
so they will not carry over to other sessions or the LLM Gateway.
Only available when `enforce_auth_on_inference` is `false` in config. Returns a
redirect back to the identity page with an error if auth enforcement is enabled.
Request body is `application/x-www-form-urlencoded` (browser form submission).
tags:
- Per-User OAuth
- Consent Flow
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required: [flow_id]
properties:
flow_id:
type: string
description: Pending flow ID
responses:
'302':
description: |
Redirect to `/oauth/consent/mcps?flow_id=xxx` on success, or back to
`/oauth/consent?flow_id=xxx&error=...` if identity enforcement is required.
headers:
Location:
schema:
type: string
consent-submit:
post:
operationId: submitConsent
summary: Finalize consent flow
description: |
Finalizes the consent flow atomically:
1. Creates a `TablePerUserOAuthSession` (24h Bifrost session token)
2. Transfers upstream tokens from the flow proxy to the session
3. Issues a single-use `TablePerUserOAuthCode` (5-minute TTL, PKCE-bound)
4. Deletes the `PendingFlow`
5. Redirects to the MCP client's `redirect_uri` with `code` and `state`
The MCP client then exchanges the code at `/api/oauth/per-user/token`.
Request body is `application/x-www-form-urlencoded` (browser form submission).
tags:
- Per-User OAuth
- Consent Flow
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required: [flow_id]
properties:
flow_id:
type: string
description: Pending flow ID
responses:
'302':
description: |
Redirect to the MCP client's registered `redirect_uri` with
`?code=xxx&state=yyy` query parameters.
headers:
Location:
schema:
type: string
description: MCP client callback URL with code and state
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'403':
description: Browser-binding cookie mismatch
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'409':
description: Consent flow already submitted (duplicate submission prevention)
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'410':
description: Consent flow expired
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
# ─── OAuth Discovery (RFC 9728 + RFC 8414) ─────────────────────────────────
# These well-known endpoints enable MCP clients to auto-discover Bifrost's
# OAuth configuration. Only active when at least one MCP client is configured
# with auth_type: per_user_oauth.
oauth-protected-resource-metadata:
get:
operationId: getOAuthProtectedResourceMetadata
summary: Protected Resource Metadata (RFC 9728)
description: |
Returns the OAuth 2.0 Protected Resource Metadata document per RFC 9728.
MCP clients fetch this after receiving a `401` response from `/mcp` (with a
`WWW-Authenticate: Bearer resource_metadata=".../.well-known/oauth-protected-resource"`
header). The response tells the client which authorization server(s) protect the
`/mcp` resource so it can proceed with discovery.
Returns `404` when no MCP clients are configured with `auth_type: per_user_oauth`.
tags:
- OAuth
- Per-User OAuth
responses:
'200':
description: Protected resource metadata
content:
application/json:
schema:
$ref: '../../schemas/management/oauth.yaml#/ProtectedResourceMetadata'
example:
resource: "https://your-bifrost-domain.com/mcp"
authorization_servers: ["https://your-bifrost-domain.com"]
scopes_supported: ["mcp:read", "mcp:write"]
bearer_methods_supported: ["header"]
'404':
description: No per-user OAuth MCP clients configured
content:
text/plain:
schema:
type: string
oauth-authorization-server-metadata:
get:
operationId: getOAuthAuthorizationServerMetadata
summary: Authorization Server Metadata (RFC 8414)
description: |
Returns the OAuth 2.0 Authorization Server Metadata document per RFC 8414.
After fetching the Protected Resource Metadata, MCP clients fetch this endpoint
to discover Bifrost's OAuth endpoints (register, authorize, token) and capabilities
(PKCE methods, grant types, etc.).
Returns `404` when no MCP clients are configured with `auth_type: per_user_oauth`.
tags:
- OAuth
- Per-User OAuth
responses:
'200':
description: Authorization server metadata
content:
application/json:
schema:
$ref: '../../schemas/management/oauth.yaml#/AuthorizationServerMetadata'
example:
issuer: "https://your-bifrost-domain.com"
authorization_endpoint: "https://your-bifrost-domain.com/api/oauth/per-user/authorize"
token_endpoint: "https://your-bifrost-domain.com/api/oauth/per-user/token"
registration_endpoint: "https://your-bifrost-domain.com/api/oauth/per-user/register"
response_types_supported: ["code"]
grant_types_supported: ["authorization_code"]
code_challenge_methods_supported: ["S256"]
token_endpoint_auth_methods_supported: ["none"]
scopes_supported: ["mcp:read", "mcp:write"]
'404':
description: No per-user OAuth MCP clients configured
content:
text/plain:
schema:
type: string

View File

@@ -0,0 +1,157 @@
plugins:
get:
operationId: listPlugins
summary: List all plugins
description: |
Returns a list of all plugins with their configurations and status.
The `actualName` field contains the plugin name from `GetName()` (used as the map key),
while `name` contains the display name from the configuration.
The `types` array in the status shows which interfaces the plugin implements (llm, mcp, http).
tags:
- Plugins
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/plugins.yaml#/ListPluginsResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createPlugin
summary: Create a new plugin
description: Creates a new plugin with the specified configuration.
tags:
- Plugins
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/plugins.yaml#/CreatePluginRequest'
responses:
'201':
description: Plugin created successfully
content:
application/json:
schema:
$ref: '../../schemas/management/plugins.yaml#/PluginResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'409':
description: Plugin already exists
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
/plugins/{name}:
get:
operationId: getPlugin
summary: Get a specific plugin
description: |
Returns the configuration for a specific plugin.
The response includes the plugin status with types array showing which interfaces
the plugin implements (llm, mcp, http). The `actualName` field shows the plugin name
from GetName() (used as the map key), which may differ from the display name (`name`).
tags:
- Plugins
parameters:
- name: name
in: path
required: true
description: Plugin display name (the config field `name`, not the internal `actualName` from GetName())
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/plugins.yaml#/Plugin'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Plugin not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updatePlugin
summary: Update a plugin
description: |
Updates a plugin's configuration. Will reload or stop the plugin based on enabled status.
The response `actualName` field shows the plugin name from GetName() (used as the map key),
which may differ from the display name (`name`).
tags:
- Plugins
parameters:
- name: name
in: path
required: true
description: Plugin display name (the config field `name`, not the internal `actualName` from GetName())
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/plugins.yaml#/UpdatePluginRequest'
responses:
'200':
description: Plugin updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/plugins.yaml#/PluginResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Plugin not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deletePlugin
summary: Delete a plugin
description: Removes a plugin from the configuration and stops it if running.
tags:
- Plugins
parameters:
- name: name
in: path
required: true
description: Plugin display name (the config field `name`, not the internal `actualName` from GetName())
schema:
type: string
responses:
'200':
description: Plugin deleted successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Plugin not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'

View File

@@ -0,0 +1,651 @@
# Prompt Repository paths
folders:
get:
operationId: listFolders
summary: List folders
description: Returns all prompt folders.
tags:
- Prompt Repository
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
folders:
type: array
items:
$ref: '../../schemas/management/prompts.yaml#/Folder'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createFolder
summary: Create folder
description: Creates a new prompt folder.
tags:
- Prompt Repository
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/CreateFolderRequest'
responses:
'200':
description: Folder created
content:
application/json:
schema:
type: object
properties:
folder:
$ref: '../../schemas/management/prompts.yaml#/Folder'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
folders-by-id:
get:
operationId: getFolder
summary: Get folder
description: Returns a folder by ID.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
folder:
$ref: '../../schemas/management/prompts.yaml#/Folder'
'404':
description: Folder not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updateFolder
summary: Update folder
description: Updates a folder's name or description.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/UpdateFolderRequest'
responses:
'200':
description: Folder updated
content:
application/json:
schema:
type: object
properties:
folder:
$ref: '../../schemas/management/prompts.yaml#/Folder'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Folder not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deleteFolder
summary: Delete folder
description: Deletes a folder and cascades to contained prompts.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Folder deleted
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'404':
description: Folder not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
prompts:
get:
operationId: listPrompts
summary: List prompts
description: Returns all prompts, optionally filtered by folder.
tags:
- Prompt Repository
parameters:
- name: folder_id
in: query
description: Filter by folder ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
prompts:
type: array
items:
$ref: '../../schemas/management/prompts.yaml#/Prompt'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createPrompt
summary: Create prompt
description: Creates a new prompt.
tags:
- Prompt Repository
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/CreatePromptRequest'
responses:
'200':
description: Prompt created
content:
application/json:
schema:
type: object
properties:
prompt:
$ref: '../../schemas/management/prompts.yaml#/Prompt'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
prompts-by-id:
get:
operationId: getPrompt
summary: Get prompt
description: Returns a prompt by ID with its latest version.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
prompt:
$ref: '../../schemas/management/prompts.yaml#/Prompt'
'404':
description: Prompt not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updatePrompt
summary: Update prompt
description: Updates a prompt's name or folder.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/UpdatePromptRequest'
responses:
'200':
description: Prompt updated
content:
application/json:
schema:
type: object
properties:
prompt:
$ref: '../../schemas/management/prompts.yaml#/Prompt'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deletePrompt
summary: Delete prompt
description: Deletes a prompt and all its versions and sessions.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Prompt deleted
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'404':
description: Prompt not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
prompt-versions:
get:
operationId: listPromptVersions
summary: List prompt versions
description: Returns all versions for a prompt.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Prompt ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
versions:
type: array
items:
$ref: '../../schemas/management/prompts.yaml#/PromptVersion'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createPromptVersion
summary: Create prompt version
description: Creates a new version for a prompt.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Prompt ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/CreateVersionRequest'
responses:
'200':
description: Version created
content:
application/json:
schema:
type: object
properties:
version:
$ref: '../../schemas/management/prompts.yaml#/PromptVersion'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
versions-by-id:
get:
operationId: getPromptVersion
summary: Get prompt version
description: Returns a specific version by ID.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Version ID
schema:
type: integer
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
version:
$ref: '../../schemas/management/prompts.yaml#/PromptVersion'
'404':
description: Version not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deletePromptVersion
summary: Delete prompt version
description: Deletes a specific version.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Version ID
schema:
type: integer
responses:
'200':
description: Version deleted
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'404':
description: Version not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
prompt-sessions:
get:
operationId: listPromptSessions
summary: List prompt sessions
description: Returns all sessions for a prompt.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Prompt ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
sessions:
type: array
items:
$ref: '../../schemas/management/prompts.yaml#/PromptSession'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createPromptSession
summary: Create prompt session
description: Creates a new playground session for a prompt.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Prompt ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/CreateSessionRequest'
responses:
'200':
description: Session created
content:
application/json:
schema:
type: object
properties:
session:
$ref: '../../schemas/management/prompts.yaml#/PromptSession'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
sessions-by-id:
get:
operationId: getPromptSession
summary: Get prompt session
description: Returns a specific session by ID.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Session ID
schema:
type: integer
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
session:
$ref: '../../schemas/management/prompts.yaml#/PromptSession'
'404':
description: Session not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updatePromptSession
summary: Update prompt session
description: Updates a session's messages, model params, etc.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Session ID
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/UpdateSessionRequest'
responses:
'200':
description: Session updated
content:
application/json:
schema:
type: object
properties:
session:
$ref: '../../schemas/management/prompts.yaml#/PromptSession'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deletePromptSession
summary: Delete prompt session
description: Deletes a specific session.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Session ID
schema:
type: integer
responses:
'200':
description: Session deleted
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'404':
description: Session not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
sessions-rename:
put:
operationId: renamePromptSession
summary: Rename prompt session
description: Renames a session.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Session ID
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/RenameSessionRequest'
responses:
'200':
description: Session renamed
content:
application/json:
schema:
type: object
properties:
session:
$ref: '../../schemas/management/prompts.yaml#/PromptSession'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
sessions-commit:
post:
operationId: commitPromptSession
summary: Commit session as version
description: Commits the current session state as a new prompt version.
tags:
- Prompt Repository
parameters:
- name: id
in: path
required: true
description: Session ID
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/prompts.yaml#/CommitSessionRequest'
responses:
'200':
description: Version created from session
content:
application/json:
schema:
type: object
properties:
version:
$ref: '../../schemas/management/prompts.yaml#/PromptVersion'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'

View File

@@ -0,0 +1,512 @@
providers:
get:
operationId: listProviders
summary: List all providers
description: Returns a list of all configured providers with their configurations and status.
tags:
- Providers
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ListProvidersResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: addProvider
summary: Add a new provider
description: Adds a new provider with the specified configuration.
tags:
- Providers
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/AddProviderRequest'
responses:
'200':
description: Provider added successfully
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ProviderResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'409':
description: Provider already exists
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
providers-by-name:
get:
operationId: getProvider
summary: Get a specific provider
description: Returns the configuration for a specific provider.
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ProviderResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Provider not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updateProvider
summary: Update a provider
description: |
Updates a provider's configuration. Expects ALL fields to be provided,
including both edited and non-edited fields. Partial updates are not supported.
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/UpdateProviderRequest'
responses:
'200':
description: Provider updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ProviderResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deleteProvider
summary: Delete a provider
description: Removes a provider from the configuration.
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
responses:
'200':
description: Provider deleted successfully
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ProviderResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Provider not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
provider-keys:
get:
operationId: listProviderKeys
summary: List keys for a provider
description: Returns all keys configured for a specific provider.
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ListProviderKeysResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Provider not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createProviderKey
summary: Create a key for a provider
description: |
Creates a new API key for the specified provider. The key `id` is auto-generated
if omitted. `enabled` defaults to `true` if omitted. `value` is required and must
not be empty. Keys cannot be created on keyless providers.
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/Key'
responses:
'200':
description: Key created successfully
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/Key'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Provider not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'409':
description: Key ID already exists
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
provider-key-by-id:
get:
operationId: getProviderKey
summary: Get a specific key for a provider
description: Returns a single key for the specified provider.
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
- name: key_id
in: path
required: true
description: Key ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/Key'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Provider or key not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updateProviderKey
summary: Update a key for a provider
description: |
Updates an existing key. Send the full key object. Redacted values sent back
unchanged are automatically preserved (the server merges them with the stored
raw values).
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
- name: key_id
in: path
required: true
description: Key ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/Key'
responses:
'200':
description: Key updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/Key'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Provider or key not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deleteProviderKey
summary: Delete a key from a provider
description: Deletes a key from the specified provider. Returns the deleted key.
tags:
- Providers
parameters:
- name: provider
in: path
required: true
description: Provider name
schema:
type: string
- name: key_id
in: path
required: true
description: Key ID
schema:
type: string
responses:
'200':
description: Key deleted successfully
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/Key'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Provider or key not found
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
keys:
get:
operationId: listKeys
summary: List all keys
description: Returns a list of all configured API keys across all providers.
tags:
- Providers
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: '../../schemas/management/providers.yaml#/Key'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
models:
get:
operationId: listModelsManagement
summary: List models
description: |
Lists available models with optional filtering by query, provider, or keys.
tags:
- Providers
parameters:
- name: query
in: query
description: Filter models by name (case-insensitive partial match)
schema:
type: string
- name: provider
in: query
description: Filter by specific provider name
schema:
type: string
- name: keys
in: query
description: Comma-separated list of key IDs to filter models accessible by those keys
style: form
explode: false
schema:
type: array
items:
type: string
- name: limit
in: query
description: Maximum number of results to return (default 5)
schema:
type: integer
default: 5
- name: unfiltered
in: query
description: If true, return all models including those filtered out by provider-level restrictions
schema:
type: boolean
default: false
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ListModelsResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
models-details:
get:
operationId: listModelDetailsManagement
summary: List model details
description: |
Lists available models with capability metadata, when available from the model catalog, with optional filtering by query, provider, or keys.
tags:
- Providers
parameters:
- name: query
in: query
description: Filter models by name (case-insensitive partial match)
schema:
type: string
- name: provider
in: query
description: Filter by specific provider name
schema:
type: string
- name: keys
in: query
description: Comma-separated list of key IDs to filter models accessible by those keys
style: form
explode: false
schema:
type: array
items:
type: string
- name: limit
in: query
description: Maximum number of results to return (default 20)
schema:
type: integer
default: 20
- name: unfiltered
in: query
description: If true, return all models including those filtered out by provider-level restrictions
schema:
type: boolean
default: false
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/providers.yaml#/ListModelDetailsResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
models-parameters:
get:
operationId: getModelParameters
summary: Get model parameters
description: Returns the available parameter definitions for models.
tags:
- Providers
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
additionalProperties: true
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
models-base:
get:
operationId: listBaseModels
summary: List base models
description: Returns a list of base models from the model catalog.
tags:
- Providers
parameters:
- name: query
in: query
description: Filter models by name
schema:
type: string
- name: provider
in: query
description: Filter by provider
schema:
type: string
- name: limit
in: query
description: Maximum number of results to return
schema:
type: integer
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
additionalProperties: true
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'

View File

@@ -0,0 +1,105 @@
login:
post:
operationId: login
summary: Login
description: |
Authenticates a user and returns a session token.
Sets a cookie with the session token for subsequent requests.
tags:
- Session
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/LoginRequest'
responses:
'200':
description: Login successful
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/LoginResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'401':
description: Invalid credentials
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'403':
description: Authentication is not enabled
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logout:
post:
operationId: logout
summary: Logout
description: Logs out the current user and invalidates the session token.
tags:
- Session
responses:
'200':
description: Logout successful
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/LogoutResponse'
'403':
description: Authentication is not enabled
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
is-auth-enabled:
get:
operationId: isAuthEnabled
summary: Check if authentication is enabled
description: Returns whether authentication is enabled and if the current token is valid.
tags:
- Session
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/IsAuthEnabledResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
ws-ticket:
post:
operationId: issueWSTicket
summary: Issue WebSocket ticket
description: |
Issues a short-lived ticket for authenticating WebSocket connections.
The ticket can be used as a query parameter when upgrading to WebSocket.
tags:
- Session
responses:
'200':
description: Ticket issued successfully
content:
application/json:
schema:
type: object
properties:
ticket:
type: string
description: Short-lived WebSocket authentication ticket
'403':
description: Authentication is not enabled
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'

View File

@@ -0,0 +1,534 @@
users:
get:
operationId: listUsers
summary: List users
description: Returns a paginated list of users with optional search.
tags:
- Users
parameters:
- name: page
in: query
description: Page number (1-based)
schema:
type: integer
minimum: 1
default: 1
- name: limit
in: query
description: Number of users per page (max 100)
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- name: search
in: query
description: Search by name or email
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/ListUsersResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createUser
summary: Create user
description: Manually creates a new user in the organization.
tags:
- Users
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/CreateUserRequest'
responses:
'200':
description: User created successfully
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/UserResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'409':
description: User with this email already exists
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
users-by-id:
delete:
operationId: deleteUser
summary: Delete user
description: >
Permanently removes a user from the organization. This cascades to delete
the user's governance settings (budget/rate limits), team memberships,
access profiles, and OIDC sessions. Cannot delete yourself.
tags:
- Users
parameters:
- name: id
in: path
required: true
description: User ID
schema:
type: string
responses:
'200':
description: User deleted successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'400':
description: Bad request (e.g. cannot delete yourself)
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'404':
description: User not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
users-me-permissions:
get:
operationId: getCurrentUserPermissions
summary: Get current user permissions
description: >
Returns the RBAC permissions for the authenticated user. When SCIM is not
enabled, returns full permissions for all resources. Otherwise returns the
permissions associated with the user's assigned role.
tags:
- Users
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/PermissionsResponse'
'401':
description: Unauthorized (user not authenticated)
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'404':
description: User not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
users-role:
put:
operationId: assignUserRole
summary: Assign role to user
description: >
Assigns an RBAC role to a user. This also auto-assigns the default
access profile for the new role and reloads the RBAC permission cache.
tags:
- Users
parameters:
- name: id
in: path
required: true
description: User ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/AssignUserRoleRequest'
responses:
'200':
description: Role assigned successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: User or role not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
users-teams:
get:
operationId: getUserTeams
summary: Get user's teams
description: Returns the list of teams a user belongs to, including the membership source.
tags:
- Users
parameters:
- name: id
in: path
required: true
description: User ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/UserTeamsResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: User not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updateUserTeams
summary: Update user's team assignments
description: >
Replaces the user's manual team assignments. Synced team memberships
(from SCIM providers) are preserved and cannot be removed via this endpoint.
tags:
- Users
parameters:
- name: id
in: path
required: true
description: User ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/UpdateUserTeamsRequest'
responses:
'200':
description: Teams updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'400':
description: Bad request (e.g. team not found)
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'404':
description: User not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
# ---- Teams ----
teams:
get:
operationId: listTeams
summary: List teams
description: Returns a paginated list of teams with optional search.
tags:
- Teams
parameters:
- name: page
in: query
description: Page number (1-based)
schema:
type: integer
minimum: 1
default: 1
- name: limit
in: query
description: Number of teams per page (max 100)
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- name: search
in: query
description: Search by team name
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/ListTeamsResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: createTeam
summary: Create team
description: Creates a new team. The team ID is derived from the name.
tags:
- Teams
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/CreateTeamRequest'
responses:
'200':
description: Team created successfully
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/CreateTeamResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'409':
description: Team with this name already exists
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
teams-by-id:
get:
operationId: getTeam
summary: Get team
description: Returns details of a specific team including member count.
tags:
- Teams
parameters:
- name: id
in: path
required: true
description: Team ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/TeamObject'
'404':
description: Team not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
put:
operationId: updateTeam
summary: Update team
description: Updates a team. Note that renaming teams is not allowed.
tags:
- Teams
parameters:
- name: id
in: path
required: true
description: Team ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/UpdateTeamRequest'
responses:
'200':
description: Team updated successfully
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/CreateTeamResponse'
'400':
description: Bad request (e.g. renaming not allowed)
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'404':
description: Team not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
delete:
operationId: deleteTeam
summary: Delete team
description: Permanently removes a team.
tags:
- Teams
parameters:
- name: id
in: path
required: true
description: Team ID
schema:
type: string
responses:
'200':
description: Team deleted successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'404':
description: Team not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
# ---- Team Members ----
team-members:
get:
operationId: getTeamMembers
summary: List team members
description: Returns all members of a team with their user details and membership source.
tags:
- Teams
parameters:
- name: id
in: path
required: true
description: Team ID
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/TeamMembersResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'404':
description: Team not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
post:
operationId: addTeamMember
summary: Add team member
description: Adds a user to a team. Both the team and user must exist.
tags:
- Teams
parameters:
- name: id
in: path
required: true
description: Team ID
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/users.yaml#/AddTeamMemberRequest'
responses:
'200':
description: Member added successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'404':
description: Team or user not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'409':
description: User is already a member of this team
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
team-member-by-id:
delete:
operationId: removeTeamMember
summary: Remove team member
description: Removes a user from a team.
tags:
- Teams
parameters:
- name: id
in: path
required: true
description: Team ID
schema:
type: string
- name: userId
in: path
required: true
description: User ID to remove
schema:
type: string
responses:
'200':
description: Member removed successfully
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/MessageResponse'
'404':
description: Membership not found
content:
application/json:
schema:
$ref: '../../schemas/management/common.yaml#/ErrorResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'