llm
Infer Schema
Analyze sample text and/or uploaded files, and propose a JSON Schema describing the entity types
and relationships present. The returned schema can be passed directly to
/v1/llm/custom-prompt or /v1/cognify.
POST
Infer Schema
Documentation Index
Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
multipart/form-data
Response
Successful Response
Previous
Sync To CloudSync local data to Cognee Cloud.
This endpoint triggers synchronization of local Cognee data to your cloud instance.
It uploads your local datasets, knowledge graphs, and processed data to the cloud
for backup, sharing, or cloud-based processing.
## Request Body (JSON)
```json
{
"dataset_ids": ["123e4567-e89b-12d3-a456-426614174000", "456e7890-e12b-34c5-d678-901234567000"]
}
```
## Response
Returns immediate response for the sync operation:
- **run_id**: Unique identifier for tracking the background sync operation
- **status**: Always "started" (operation runs in background)
- **dataset_ids**: List of dataset IDs being synced
- **dataset_names**: List of dataset names being synced
- **message**: Description of the background operation
- **timestamp**: When the sync was initiated
- **user_id**: User who initiated the sync
## Cloud Sync Features
- **Automatic Authentication**: Uses your Cognee Cloud credentials
- **Data Compression**: Optimizes transfer size for faster uploads
- **Smart Sync**: Automatically handles data updates efficiently
- **Progress Tracking**: Monitor sync status with sync_id
- **Error Recovery**: Automatic retry for failed transfers
- **Data Validation**: Ensures data integrity during transfer
## Example Usage
```bash
# Sync multiple datasets to cloud by IDs (JSON request)
curl -X POST "http://localhost:8000/api/v1/sync" \
-H "Content-Type: application/json" \
-H "Cookie: auth_token=your-token" \
-d '{"dataset_ids": ["123e4567-e89b-12d3-a456-426614174000", "456e7890-e12b-34c5-d678-901234567000"]}'
# Sync all user datasets (empty request body or null dataset_ids)
curl -X POST "http://localhost:8000/api/v1/sync" \
-H "Content-Type: application/json" \
-H "Cookie: auth_token=your-token" \
-d '{}'
```
## Error Codes
- **400 Bad Request**: Invalid dataset_ids format
- **401 Unauthorized**: Invalid or missing authentication
- **403 Forbidden**: User doesn't have permission to access dataset
- **404 Not Found**: Dataset not found
- **409 Conflict**: Sync operation conflict or cloud service unavailable
- **413 Payload Too Large**: Dataset too large for current cloud plan
- **429 Too Many Requests**: Rate limit exceeded
## Notes
- Sync operations run in the background - you get an immediate response
- Use the returned run_id to track progress (status API coming soon)
- Large datasets are automatically chunked for efficient transfer
- Cloud storage usage counts against your plan limits
- The sync will continue even if you close your connection
Next
Infer Schema