Create data source
Create a new data source with text content.
Path Parameters
Your magic AI project id
Request Body required
Project request body
Name of the datasource. Please give it a meaningful name so that you can easily find it later.
The text content of the data source. This text will be used to train your custom AI chat bot.
- 200
- 400
- 401
- 403
- 426
- 500
successful operation
Schema
The unique identifier of the data source
Your Magic AI project id
The name of the data source.
Possible values: [pending
, processing
, ready
, failed
]
The status of the data source. If the status is ready, it means that the data source is ready to be used to train the AI model. If the status is processing, it means that the data source is still being processed. You can not use the data source until the status is ready.
Possible values: [file
, drive
, notion
, web
, text
]
Data source type. This is automatically set by the system depending on how did you connect your data source. You can not change it.
A short summary of the data source. When you first upload your data source, the system will automatically generate a summary for you.
{
"id": "5f738671-0ccc-4d32-9b7a-ddab669ab799",
"projectId": "5f738671-0ccc-4d32-9b7a-ddab669ab799",
"name": "Magic AI website home page",
"status": "ready",
"sourceType": "file",
"summary": "string",
"characterCount": 1000
}
The specified parameter is invalid
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}
Authentication information is missing or invalid
Response Headers
WWW_Authenticate string
You don't have permission to access this resource
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}
You need to upgrade your account to access this resource
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}
An unexpected error occurred
Schema
unique error code
{
"message": "Invalid Request",
"details": "Project already exists",
"code": "PROJECT_EXISTS"
}