Skip to main content

Overview

The Adaptive REST API provides endpoints for inference, feedback, and interactions. Base URL: https://your-adaptive-instance/api/v1

Chunked Upload

POST /api/v1/upload/init

Initialize Chunked Upload Start a new chunked upload session for large files. Returns a session ID to be used for uploading parts. Request Body
parameters
  • content_type (string | null): MIME type of the file being uploaded
  • metadata (object | null): Custom metadata to attach to the upload session
  • total_parts_count (integer<int32>) (required): Total number of parts that will be uploaded
Response (InitChunkedUploadResponse) Upload session created successfully

POST /api/v1/upload/part

Upload Part Upload a single part (chunk) of a file to an existing upload session.
parameters
  • session_id (string, query) (required): Upload session identifier
  • part_number (integer<int32>, query) (required): Part number (1-indexed)

DELETE /api/v1/upload/abort

Abort Chunked Upload Cancel an ongoing chunked upload session and clean up any uploaded parts. Request Body
parameters
  • session_id (string) (required): Upload session identifier to abort

POST /api/v1/upload/status

Get Upload Session Status Cancel an ongoing chunked upload session and clean up any uploaded parts. Request Body
parameters
  • session_id (string) (required):
Response (GetUploadSessionStatusResponse) Upload session status retrieved successfully

Completions

POST /api/v1/chat/completions

Generate chat completion Generate a chat completion from a prompt using one model in your project. Your prompt messages can include several roles. This endpoints supports streaming Request Body
parameters
  • stop (string[] | null):
  • max_tokens (integer<int32> | null):
  • temperature (number<float> | null):
  • top_p (number<float> | null):
  • max_ttft_ms (integer<int64> | null):
  • messages (ChatMessageInput[]) (required):
  • model (string) (required): can be of the form {project}/{model} or {project}. In the latter it will use the default model
  • stream (boolean):
  • stream_options (any):
  • session_id (string<uuid> | null):
  • user (string<uuid> | null):
  • ab_campaign (any):
  • n (integer<int32>):
  • labels (any):
  • metadata (any):
  • system_prompt_args (object | null): Will be used to render system prompt template
  • tags (string[] | null):
  • use_tools (boolean):
  • tools (ToolOverride[] | null): Override tool configuration for this request - enables/disables specific tools
  • store (boolean | null):
Response (ChatResponse) a stream will be returned if streaming = true in the request

Datasets

GET /api/v1/projects/{project}/datasets/{dataset_id}/download

Download a dataset file from storage Returns the dataset JSONL file as an attachment
parameters
  • project (IdOrKey, path) (required): Project ID or key
  • dataset (IdOrKey, path) (required): Dataset ID or key
  • format (string, query): File format: ‘recipe’ (converted format) or ‘original’ (as uploaded). Defaults to ‘original’. If original file is not available, falls back to recipe format.
  • dataset_id (IdOrKey, path) (required):

Embeddings

POST /api/v1/embeddings

Request Body
parameters
  • input (string) (required):
  • model (string) (required): can be of the form ’/’ or ''. In the latter it will use the default model
  • encoding_format (any):
  • dimensions (integer<int32> | null):
  • user (string<uuid> | null):
  • session_id (string<uuid> | null):
Response (EmbeddingsResponseList)

Feedback

POST /api/v1/comparison

Add comparison Register a comparison between two interactions to indicate a preference according to a criteria. Both interactions should share the same prompt. Request Body
parameters
  • metric (IdOrKey) (required):
  • messages (ChatMessageInput[] | null): Required when using raw text for completion, ignored if using ids
  • preferred_completion (CompletionIdOrText) (required):
  • other_completion (CompletionIdOrText) (required):
  • tied (any):
  • project (IdOrKey) (required):
  • user_id (string<uuid> | null):
Response (ComparisonOutput) Comparison recorded

POST /api/v1/outcome

Add outcome Register an outcome about a previous user session Request Body
parameters
  • value (any) (required): If the metric is Bool, accepts 0, 1, true or false If the metric is Scalar, accepts number
  • project_id (IdOrKey) (required):
  • metric (IdOrKey) (required):
  • session_id (string<uuid>) (required):
  • user_id (string<uuid> | null):
Response (OutcomeOutput) outcome recorded

Interactions

POST /api/v1/interactions

Add interaction Import an interaction in your project. You can also include feedback about the interaction Request Body
parameters
  • model_service (any):
  • project (IdOrKey) (required):
  • messages (ChatMessageInput[]) (required):
  • completion (string) (required):
  • feedbacks (InteractionFeedback[]):
  • user (string<uuid> | null):
  • session_id (string<uuid> | null):
  • created_at (any):
  • ab_campaign (any):
  • labels (any):
Response (AddInteractionsResponse) Interaction recorded

Recipes

GET /api/v1/projects/{project}/recipes/{recipe}/download

Download a recipe zip file from storage Returns the recipe zip file as an attachment. Supports both project-specific recipes and global recipes (available in all projects).
parameters
  • project (IdOrKey, path) (required): Project ID or key
  • recipe (IdOrKey, path) (required): Recipe ID or key

artifacts::rest

GET /artifacts/{artifact_id}/download

parameters
  • artifact_id (string<uuid>, path) (required): Unique identifier for the artifact

image::rest

GET /images/{project_id}/{filename}

parameters
  • project_id (string<uuid>, path) (required): Project ID the image belongs to
  • filename (string, path) (required): Image filename (hash.ext)