Skip to main content
POST
/
v2
/
knowledge
Create a knowledge
curl --request POST \
  --url https://api.orq.ai/v2/knowledge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "internal",
  "key": "<string>",
  "description": "<string>",
  "embedding_model": "<string>",
  "is_private_model": false,
  "retrieval_settings": {
    "retrieval_type": "hybrid_search",
    "top_k": 5,
    "threshold": 0,
    "rerank_config": {
      "top_k": 5,
      "rerank_threshold": 0.5,
      "rerank_model": "<string>"
    },
    "agentic_rag_config": {
      "model": "<string>"
    }
  },
  "path": "Default"
}'
{
  "_id": "<string>",
  "created": "<string>",
  "description": "<string>",
  "key": "<string>",
  "domain_id": "<string>",
  "path": "Default",
  "created_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated": "<string>",
  "type": "internal",
  "retrieval_settings": {
    "retrieval_type": "hybrid_search",
    "top_k": 5,
    "threshold": 0,
    "rerank_config": {
      "top_k": 5,
      "rerank_threshold": 0.5,
      "rerank_model": "<string>"
    },
    "agentic_rag_config": {
      "model": "<string>"
    }
  },
  "model": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
  • Option 1
  • Option 2
key
string
required
embedding_model
string
required

The embeddings model to use for the knowledge base. This model will be used to embed the chunks when they are added to the knowledge base.

path
string
required

Entity storage path in the format: project/folder/subfolder/...

The first element identifies the project, followed by nested folders (auto-created as needed).

With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.

Example:

"Default"

type
enum<string>
default:internal
Available options:
internal
description
string
is_private_model
boolean
default:false
retrieval_settings
object

The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.

Response

200 - application/json

Knowledge successfully created

  • Option 1
  • Option 2
_id
string
required

The unique identifier of the knowledge base.

created
string
required

The creation date of the knowledge base.

key
string
required

The unique key of the knowledge base.

domain_id
string
required

The project/domain ID of the knowledge base.

updated
string
required

The last update date of the knowledge base.

model
string
required

The embeddings model used for the knowledge base.

description
string

The description of the knowledge base.

path
string

Entity storage path in the format: project/folder/subfolder/...

The first element identifies the project, followed by nested folders (auto-created as needed).

With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.

Example:

"Default"

created_by_id
string<uuid> | null
updated_by_id
string<uuid> | null
type
enum<string>
default:internal
Available options:
internal
retrieval_settings
object

The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.