The official Python SDK for the Cortex AI platform.
Project description
# Introduction
> You can generate and manage API keys from your Cortex Dashboard. All endpoints require an API key sent as a Bearer token in the Authorization header.
Welcome to the Cortex SDK API Reference. This section documents every available endpoint and how to interact with them to power AI apps and agents with intelligent memory and retrieval.
> Base URL: `https://api.usecortex.ai`
>
> Contact us to get your API key at [founders@usecortex.ai](mailto:founders@usecortex.ai)
```mdx
Authorization: Bearer <your_api_key>
Data Ingestion
Upload and import content into Cortex from various sources.
/upload/upload_document— Upload single documents/upload/upload_text— Upload text/markdown content/upload/upload_app_sources— Import from workplace apps (Gmail, Slack, etc.)/upload/scrape_webpage— Scrape and index web content/upload/verify_processing— Check upload processing status/upload/batch_upload— Upload multiple files at once
Search & Query
Retrieve answers and information from your knowledge base.
/search/qna— Main search endpoint with AI-powered responses. Supports optionalmetadataparameter to filter sources bysource_titleorsource_type./search/retrieve— Hybrid search without AI generation. Returns structured search results for custom processing. –/search/full-text-search– Perform a full text search without AI generation. Allows you to use operators like logicalAND,OR
Knowledge Management
Browse, fetch, and manage your knowledge base.
/list/sources— Browse all indexed sources/list/sources_by_id— Get specific sources by ID/fetch/fetch_content— Retrieve file content and download URLs/delete_source— Remove sources from knowledge base
Update & Upsert
Update existing content and embeddings. If a source_id does not exist, these endpoints upsert (create or update).
/upload/update_text— Upsert markdown/text content bysource_id/upload/update_document— Upsert a file/document bysource_id/upload/update_webpage— Re-scrape and upsert a webpage bysource_idandweb_url/upload/update_embeddings— Update existing embeddings bychunk_idwithin a batch/source
Embeddings
Manage and query pre-computed embeddings.
/upload/upload_embeddings— Upload embeddings and get generatedchunk_ids/embeddings/search— Vector similarity search; returns nearestchunk_idsand scores/embeddings/by-chunk-ids— Retrieve embedding vectors for specificchunk_ids/embeddings/delete— Delete embeddings bychunk_id
Tenant Management
Create and monitor tenants for multi-tenant setups.
/user/create_tenant— Create a tenant (optionally providetenant_id, or auto-generate)/embeddings/create_embeddings_tenant— Create an embeddings-only tenant (setssub_tenant_id = tenant_id); use when directly uploading/searching embeddings/tenant/stats— Get tenant stats (object count, vector dimension, identifiers)
User Memory
Personalize, retrieve, and manage user-specific AI memories for advanced agentic workflows.
/user_memory/list_user_memories— Browse user memories/user_memory/retrieve_user_memory— Get specific user memories/user_memory/add_user_memory— Manually add user-specific memories/user_memory/generate_user_memory— AI-generated personalized memories/user_memory/delete_user_memory— Remove user memories
💡 Best Practices
- Use sub-tenants to support multi-user isolation in B2B use cases.
- Leverage metadata (e.g.,
source_title,source_typein the QnA API) for fine-grained filtering and agentic retrieval. - Tune search_alpha and recency_bias to control relevance.
- Enable highlight_chunks for chunk-level citations.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usecortex_ai-0.2.0.tar.gz.
File metadata
- Download URL: usecortex_ai-0.2.0.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98dfa9b04faef56858e8704e39da03a21ab7d9d5c6633eefb0746c8ba4d39ab6
|
|
| MD5 |
7c14dc092ddb485f6d1d57610e236863
|
|
| BLAKE2b-256 |
0343de94ab56223c2068388f41b5cc56b0451b479b5ccce48360c8fb654d4f07
|
File details
Details for the file usecortex_ai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: usecortex_ai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 80.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b596633183fada6ef7fe889464856a782dfffba06d588a7a4a32692ece9b571d
|
|
| MD5 |
7fb0ce704f1235a2577ccd670407aa11
|
|
| BLAKE2b-256 |
588027319658f9a9fca354a68ba5f606e951838154a793ef76c011f2024c229b
|