Files
bifrost/docs/openapi/schemas/inference/containers.yaml
Beyhan Oğur 880f412e2c first commit
2026-04-26 21:52:23 +03:00

345 lines
9.1 KiB
YAML

# Containers API schemas
ContainerStatus:
type: string
enum:
- running
description: The status of a container
ContainerExpiresAfter:
type: object
description: Expiration configuration for a container
properties:
anchor:
type: string
description: The anchor point for expiration (e.g., "last_active_at")
minutes:
type: integer
description: Number of minutes after anchor point
ContainerObject:
type: object
description: A container object
properties:
id:
type: string
description: The unique identifier for the container
object:
type: string
description: The object type (always "container")
name:
type: string
description: The name of the container
created_at:
type: integer
format: int64
description: Unix timestamp of when the container was created
status:
$ref: '#/ContainerStatus'
expires_after:
$ref: '#/ContainerExpiresAfter'
last_active_at:
type: integer
format: int64
description: Unix timestamp of last activity
memory_limit:
type: string
description: Memory limit for the container (e.g., "1g", "4g")
metadata:
type: object
additionalProperties:
type: string
description: User-provided metadata
ContainerCreateRequest:
type: object
required:
- provider
- name
properties:
provider:
$ref: './common.yaml#/ModelProvider'
name:
type: string
description: Name of the container
expires_after:
$ref: '#/ContainerExpiresAfter'
file_ids:
type: array
items:
type: string
description: IDs of existing files to copy into this container
memory_limit:
type: string
description: Memory limit for the container (e.g., "1g", "4g")
metadata:
type: object
additionalProperties:
type: string
description: User-provided metadata
ContainerCreateResponse:
type: object
properties:
id:
type: string
description: The unique identifier for the created container
object:
type: string
description: The object type (always "container")
name:
type: string
description: The name of the container
created_at:
type: integer
format: int64
description: Unix timestamp of when the container was created
status:
$ref: '#/ContainerStatus'
expires_after:
$ref: '#/ContainerExpiresAfter'
last_active_at:
type: integer
format: int64
description: Unix timestamp of last activity
memory_limit:
type: string
description: Memory limit for the container
metadata:
type: object
additionalProperties:
type: string
description: User-provided metadata
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'
ContainerListResponse:
type: object
properties:
object:
type: string
description: The object type (always "list")
data:
type: array
items:
$ref: '#/ContainerObject'
description: List of container objects
first_id:
type: string
description: ID of the first container in the list
last_id:
type: string
description: ID of the last container in the list
has_more:
type: boolean
description: Whether there are more containers to fetch
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'
ContainerRetrieveResponse:
type: object
properties:
id:
type: string
description: The unique identifier for the container
object:
type: string
description: The object type (always "container")
name:
type: string
description: The name of the container
created_at:
type: integer
format: int64
description: Unix timestamp of when the container was created
status:
$ref: '#/ContainerStatus'
expires_after:
$ref: '#/ContainerExpiresAfter'
last_active_at:
type: integer
format: int64
description: Unix timestamp of last activity
memory_limit:
type: string
description: Memory limit for the container
metadata:
type: object
additionalProperties:
type: string
description: User-provided metadata
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'
ContainerDeleteResponse:
type: object
properties:
id:
type: string
description: The ID of the deleted container
object:
type: string
description: The object type (always "container.deleted")
deleted:
type: boolean
description: Whether the container was successfully deleted
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'
# =============================================================================
# CONTAINER FILES SCHEMAS
# =============================================================================
ContainerFileObject:
type: object
description: A file object within a container
properties:
id:
type: string
description: The unique identifier for the file
object:
type: string
description: The object type (always "container.file")
container_id:
type: string
description: The ID of the container this file belongs to
path:
type: string
description: The path of the file within the container
bytes:
type: integer
format: int64
description: The size of the file in bytes
created_at:
type: integer
format: int64
description: Unix timestamp of when the file was created
source:
type: string
description: The source of the file (e.g., "user_upload", "copied")
ContainerFileCreateMultipartRequest:
type: object
description: Request to create a file in a container via multipart upload
properties:
file:
type: string
format: binary
description: The file content to upload
file_path:
type: string
description: Optional path for the file within the container
ContainerFileCreateJsonRequest:
type: object
description: Request to create a file in a container by referencing an existing file
required:
- file_id
properties:
file_id:
type: string
description: The ID of an existing file to copy into the container
file_path:
type: string
description: Optional path for the file within the container
ContainerFileCreateResponse:
type: object
description: Response from creating a file in a container
properties:
id:
type: string
description: The unique identifier for the created file
object:
type: string
description: The object type (always "container.file")
container_id:
type: string
description: The ID of the container this file belongs to
path:
type: string
description: The path of the file within the container
bytes:
type: integer
format: int64
description: The size of the file in bytes
created_at:
type: integer
format: int64
description: Unix timestamp of when the file was created
source:
type: string
description: The source of the file
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'
ContainerFileListResponse:
type: object
description: Response containing a list of files in a container
properties:
object:
type: string
description: The object type (always "list")
data:
type: array
items:
$ref: '#/ContainerFileObject'
description: List of file objects
first_id:
type: string
description: ID of the first file in the list
last_id:
type: string
description: ID of the last file in the list
has_more:
type: boolean
description: Whether there are more files to fetch
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'
ContainerFileRetrieveResponse:
type: object
description: Response from retrieving a file from a container
properties:
id:
type: string
description: The unique identifier for the file
object:
type: string
description: The object type (always "container.file")
container_id:
type: string
description: The ID of the container this file belongs to
path:
type: string
description: The path of the file within the container
bytes:
type: integer
format: int64
description: The size of the file in bytes
created_at:
type: integer
format: int64
description: Unix timestamp of when the file was created
source:
type: string
description: The source of the file
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'
ContainerFileDeleteResponse:
type: object
description: Response from deleting a file from a container
properties:
id:
type: string
description: The ID of the deleted file
object:
type: string
description: The object type (always "container.file.deleted")
deleted:
type: boolean
description: Whether the file was successfully deleted
extra_fields:
$ref: './common.yaml#/BifrostResponseExtraFields'