POST
/
knowledge
Python
from datagrid_ai import Datagrid

client = Datagrid(
    api_key="My API Key",
)
knowledge = client.knowledge.create(
    files=[b"raw file contents"],
)
print(knowledge.id)
{
  "object": "knowledge",
  "id": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status": "pending",
  "row_counts": {
    "total": 123,
    "completed": 123,
    "failed": 123
  },
  "credits": {
    "consumed": 123
  }
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data

Response

201 - application/json

Successfully created knowledge

The knowledge object represents knowledge that an agent may leverage to respond.