Foundation4.ai Server (0.1.dev31+g4933697)

Download OpenAPI specification:Download

Foundation4.ai RAG framework.

TODO: longer description of the Foundation4.ai schema
...

Providers

Builtin providers.

Get Embedding Providers

List all the available embedding providers.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Embedding Provider

Get one embedding provider.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "provider": "string"
}

Get Text Splitters

List all the available text splitters.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Text Splitter

Get one text splitter.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "parameters": { },
  • "provider": "string"
}

Pipelines

Endpoints for Pipelines and Vector Stores.

Get Embedding Models

List all the available embedding models.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Embedding Model

Get one embedding model.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "parameters": { },
  • "provider": "string",
  • "size": 0
}

Get Pipelines

List all the available pipelines.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post Pipelines

Create a pipeline.

Authorizations:
API KeyAPI Key Secret
Request Body schema: application/json
required
required
(Array of Classifications (Array of items or strings)) or Classifications (string) (Classifications)
default_text_splitter_id
required
string <uuid> (Default Text Splitter Id)
Description (string) or Description (null) (Description)
embedding_model_id
required
string <uuid> (Embedding Model Id)
name
required
string (Name)

Responses

Request samples

Content type
application/json
{
  • "classifications": [
    ],
  • "default_text_splitter_id": "a8f2730d-1ed0-4538-96b3-6ac72fdab704",
  • "description": "string",
  • "embedding_model_id": "2959178f-981f-441b-a0b6-cedb1eb6201d",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "default_text_splitter_id": "a8f2730d-1ed0-4538-96b3-6ac72fdab704",
  • "description": "string",
  • "embedding_model_id": "2959178f-981f-441b-a0b6-cedb1eb6201d",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string"
}

Delete Pipeline

Deletes an existing LLM object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get Pipeline

Gets one pipeline object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "default_text_splitter_id": "a8f2730d-1ed0-4538-96b3-6ac72fdab704",
  • "description": "string",
  • "embedding_model_id": "2959178f-981f-441b-a0b6-cedb1eb6201d",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string"
}

Update a Pipeline

Create an LLM endpoint.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
default_text_splitter_id
string <uuid> (Default Text Splitter Id)
Default: "00000000-0000-0000-0000-000000000000"
Description (string) or Description (null) (Description)
name
string (Name)
Default: ""

Responses

Request samples

Content type
application/json
{
  • "default_text_splitter_id": "00000000-0000-0000-0000-000000000000",
  • "description": "string",
  • "name": ""
}

Response samples

Content type
application/json
{
  • "default_text_splitter_id": "a8f2730d-1ed0-4538-96b3-6ac72fdab704",
  • "description": "string",
  • "embedding_model_id": "2959178f-981f-441b-a0b6-cedb1eb6201d",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string"
}

Get Pipeline Classifications

Get the classifications for a pipeline.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
null

Post Pipeline Classifications

Create a new classification for a pipeline.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
Any of
Array
Any of
= 2 items
[0]
string
string or null

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
null

Get Pipeline Document

Get one document.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
doc
required
string <uuid> (Doc)

Responses

Response samples

Content type
application/json
{
  • "classification": "string",
  • "external_identifier": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": "string",
  • "metadata": { },
  • "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
  • "status": "string",
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Delete Pipeline Documents

Delete documents.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get Pipeline Documents

Get the information for a document previously submitted.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post Pipeline Documents

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
classification
required
string (Classification)
contents
required
string (Contents)
External Identifier (string) or External Identifier (null) (External Identifier)
Metadata (object) or Metadata (null) (Metadata)
Text Splitter Id (string) or Text Splitter Id (null) (Text Splitter Id)

Responses

Request samples

Content type
application/json
{
  • "classification": "string",
  • "contents": "string",
  • "external_identifier": "string",
  • "metadata": { },
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Response samples

Content type
application/json
{
  • "classification": "string",
  • "external_identifier": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": "string",
  • "metadata": { },
  • "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
  • "status": "string",
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Delete Pipeline Document

Remove an existing document.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
doc
required
string <uuid> (Doc)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Find Fragments

Find document fragments.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
ids
required
Array of strings <uuid> (Ids) [ items <uuid > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
null

LLM

LLM Endpoints

List LLMs

List all the available LLM providers.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an LLM

Create an LLM endpoint.

Authorizations:
API KeyAPI Key Secret
Request Body schema: application/json
required
Api Key (string) or Api Key (null) (Api Key)
Description (string) or Description (null) (Description)
endpoint
required
string (Endpoint)
Model (string) or Model (null) (Model)
name
required
string (Name)

Responses

Request samples

Content type
application/json
{
  • "api_key": "string",
  • "description": "string",
  • "endpoint": "string",
  • "model": "string",
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "endpoint": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "model": "string",
  • "name": "string"
}

Delete LLM

Deletes an existing LLM object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get one LLM

Gets one LLM object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "endpoint": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "model": "string",
  • "name": "string"
}

Update an LLM

Create an LLM endpoint.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
Api Key (string) or Api Key (null) (Api Key)
Description (string) or Description (null) (Description)
endpoint
string (Endpoint)
Default: ""
Model (string) or Model (null) (Model)
name
string (Name)
Default: ""

Responses

Request samples

Content type
application/json
{
  • "api_key": "string",
  • "description": "string",
  • "endpoint": "",
  • "model": "string",
  • "name": ""
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "endpoint": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "model": "string",
  • "name": "string"
}

Query an LLM

Gets one LLM object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
query
required
string (Query)
stream
boolean (Stream)
Default: false

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "stream": false
}

Response samples

Content type
application/json
null

Agents

Get Agents

List all the available agents.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post Agent

Create an agent.

Authorizations:
API KeyAPI Key Secret
Request Body schema: application/json
required
Description (string) or Description (null) (Description)
Metadata (object) or Metadata (null) (Metadata)
name
required
string (Name)
required
Array of objects (Placeholders)
required
Array of objects (Prompt)

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "metadata": { },
  • "name": "string",
  • "placeholders": [
    ],
  • "prompt": [
    ]
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "metadata": { },
  • "name": "string",
  • "placeholders": [
    ],
  • "prompt": [
    ]
}

Delete Agent

Deletes an existing agent object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get Agent

Gets one pipeline object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "metadata": { },
  • "name": "string",
  • "placeholders": [
    ],
  • "prompt": [
    ]
}

Post Agent Query

Run an agent.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
header Parameters
X-LLM-ID
required
string <uuid> (X-Llm-Id)
X-Pipeline-ID
required
string <uuid> (X-Pipeline-Id)
Request Body schema: application/json
required
required
ClassificationSearchParameters (object) or Array of Classification (strings) or Classification (string) (Classification)
AgentExecuteOptions (object) or null
output
string (Output)
Default: "text"
Enum: "text" "json"
required
object (Prompt)
stream
boolean (Stream)
Default: false

Responses

Request samples

Content type
application/json
{
  • "classification": {
    },
  • "options": {
    },
  • "output": "text",
  • "prompt": {
    },
  • "stream": false
}

Response samples

Content type
application/json
null

Get Agent Prompt

Gets one pipeline object.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "input_variables": [
    ],
  • "placeholders": [
    ],
  • "prompt": [
    ]
}

Get Trace

Gets one pipeline object.

Authorizations:
API KeyAPI Key Secret
query Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "inputs": { },
  • "prompt": [
    ],
  • "traces": {
    }
}

Data

Document Endpoints

Create Document

Add a new document to the pipeline knowledge base.

Authorizations:
API KeyAPI Key Secret
Request Body schema: application/json
required
classification
required
string (Classification)
contents
required
string (Contents)
Metadata (object) or Metadata (null) (Metadata)
Name (string) or Name (null) (Name)
pipeline_id
required
string <uuid> (Pipeline Id)
Text Splitter Id (string) or Text Splitter Id (null) (Text Splitter Id)

Responses

Request samples

Content type
application/json
{
  • "classification": "string",
  • "contents": "string",
  • "metadata": { },
  • "name": "string",
  • "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Response samples

Content type
application/json
{
  • "classification": "string",
  • "external_identifier": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": "string",
  • "metadata": { },
  • "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
  • "status": "string",
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Remove

Remove an existing document.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Status

Get the status of a document previously submitted.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "classification": "string",
  • "external_identifier": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": "string",
  • "metadata": { },
  • "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
  • "status": "string",
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Get Pipeline Document

Get one document.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
doc
required
string <uuid> (Doc)

Responses

Response samples

Content type
application/json
{
  • "classification": "string",
  • "external_identifier": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": "string",
  • "metadata": { },
  • "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
  • "status": "string",
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Delete Pipeline Documents

Delete documents.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get Pipeline Documents

Get the information for a document previously submitted.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post Pipeline Documents

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
classification
required
string (Classification)
contents
required
string (Contents)
External Identifier (string) or External Identifier (null) (External Identifier)
Metadata (object) or Metadata (null) (Metadata)
Text Splitter Id (string) or Text Splitter Id (null) (Text Splitter Id)

Responses

Request samples

Content type
application/json
{
  • "classification": "string",
  • "contents": "string",
  • "external_identifier": "string",
  • "metadata": { },
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Response samples

Content type
application/json
{
  • "classification": "string",
  • "external_identifier": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "message": "string",
  • "metadata": { },
  • "pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
  • "status": "string",
  • "text_splitter_id": "b51a7295-6cc4-4f67-8a6b-e88b60177cc8"
}

Delete Pipeline Document

Remove an existing document.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
doc
required
string <uuid> (Doc)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Find Fragments

Find document fragments.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)
Request Body schema: application/json
required
ids
required
Array of strings <uuid> (Ids) [ items <uuid > ]

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ]
}

Response samples

Content type
application/json
null

Authentication

Get Api Keys

List all the available API Keys.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Embedding Model

Get one API Key.

Authorizations:
API KeyAPI Key Secret
path Parameters
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "description": "string",
  • "expiration": "2019-08-24T14:15:22Z",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string"
}

Login

Login route used to validate an api key.

Authorizations:
API KeyAPI Key Secret

Responses

Response samples

Content type
application/json
null

Permission

Login route used to get the permissions for a particular object.

Authorizations:
API KeyAPI Key Secret
query Parameters
type
required
string (Type)
id
required
string <uuid> (Id)

Responses

Response samples

Content type
application/json
1

Permissions

Login route used to get the permissions for a particular object.

Authorizations:
API KeyAPI Key Secret
Request Body schema: application/json
required
ids
required
Array of strings <uuid> (Ids) [ items <uuid > ]
type
required
string (Type)

Responses

Request samples

Content type
application/json
{
  • "ids": [
    ],
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "property1": 1,
  • "property2": 1
}

OpenAI-compatible Server

Chat Completions

Authorizations:
API KeyAPI Key Secret
header Parameters
X-LLM-ID
required
string <uuid> (X-Llm-Id)
X-Pipeline-ID
required
string <uuid> (X-Pipeline-Id)
X-Agent-ID
required
string <uuid> (X-Agent-Id)
ClassificationSearchParameters (object) or Array of X-Document-Classification (strings) or X-Document-Classification (string) or X-Document-Classification (null) (X-Document-Classification)
Request Body schema: application/json
required
required
Array of ChatCompletionDeveloperMessageParam (object) or ChatCompletionSystemMessageParam (object) or ChatCompletionUserMessageParam (object) or ChatCompletionAssistantMessageParam (object) or ChatCompletionToolMessageParam (object) or ChatCompletionFunctionMessageParam (object) (Messages)
required
Model (string) or Model (string) (Model) non-empty
stream
boolean (Stream)
Default: false
Temperature (number) or Temperature (null) (Temperature)

Responses

Request samples

Content type
application/json
{
  • "messages": [
    ],
  • "model": "string",
  • "stream": false,
  • "temperature": 0
}

Response samples

Content type
{
  • "choices": [
    ],
  • "created": 1677664795,
  • "id": "chatcmpl-7QyqpwdfhqwajicIEznoc6Q47XAyW",
  • "model": "gpt-4o-mini",
  • "object": "chat.completion",
  • "usage": {
    }
}

Models

Root route.

Authorizations:
API KeyAPI Key Secret
header Parameters
X-LLM-ID
required
string <uuid> (X-Llm-Id)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "object": "string"
}

Statistics

Statistics.

query Parameters
interval
string (Interval)
Default: "15m"

Responses

Response samples

Content type
application/json
null