usecortex-ai


Nameusecortex-ai JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryThe official Python SDK for the Cortex AI platform.
upload_time2025-09-04 12:45:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseCopyright (c) 2024 Cortex AI All Rights Reserved. PROPRIETARY AND CONFIDENTIAL This software is the proprietary and confidential property of Cortex AI ("the Company"). Permission is hereby granted to authorized users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company. You may not, without the express written permission of the Company: 1. Copy, modify, or create derivative works of the software. 2. Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party. 3. Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords cortex ai sdk api generative ai rag
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ```
# 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 optional `metadata` parameter to filter sources by `source_title` or `source_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 logical `AND`, `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 by `source_id`
* `/upload/update_document` — Upsert a file/document by `source_id`
* `/upload/update_webpage` — Re-scrape and upsert a webpage by `source_id` and `web_url`
* `/upload/update_embeddings` — Update existing embeddings by `chunk_id` within a batch/source

### **Embeddings**

Manage and query pre-computed embeddings.

* `/upload/upload_embeddings` — Upload embeddings and get generated `chunk_ids`
* `/embeddings/search` — Vector similarity search; returns nearest `chunk_ids` and scores
* `/embeddings/by-chunk-ids` — Retrieve embedding vectors for specific `chunk_ids`
* `/embeddings/delete` — Delete embeddings by `chunk_id`

### **Tenant Management**

Create and monitor tenants for multi-tenant setups.

* `/user/create_tenant` — Create a tenant (optionally provide `tenant_id`, or auto-generate)
* `/embeddings/create_embeddings_tenant` — Create an embeddings-only tenant (sets `sub_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_type` in 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.

---

```

```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "usecortex-ai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "cortex, ai, sdk, api, generative ai, rag",
    "author": null,
    "author_email": "Nishkarsh Shrivastava <nishkarsh@usecortex.ai>",
    "download_url": "https://files.pythonhosted.org/packages/fe/81/28206cd71e4900df1d05b88dc68d7205f5916df61358bed358dd0e89f8e3/usecortex_ai-0.2.1.tar.gz",
    "platform": null,
    "description": "```\n# Introduction\n\n> 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.\n\nWelcome 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.\n\n> Base URL: `https://api.usecortex.ai`\n>\n> Contact us to get your API key at [founders@usecortex.ai](mailto:founders@usecortex.ai)\n\n```mdx\nAuthorization: Bearer <your_api_key>\n```\n\n### **Data Ingestion**\n\nUpload and import content into Cortex from various sources.\n\n* `/upload/upload_document` \u2014 Upload single documents\n* `/upload/upload_text` \u2014 Upload text/markdown content\n* `/upload/upload_app_sources` \u2014 Import from workplace apps (Gmail, Slack, etc.)\n* `/upload/scrape_webpage` \u2014 Scrape and index web content\n* `/upload/verify_processing` \u2014 Check upload processing status\n* `/upload/batch_upload` \u2014 Upload multiple files at once\n\n### **Search & Query**\n\nRetrieve answers and information from your knowledge base.\n\n* `/search/qna` \u2014 Main search endpoint with AI-powered responses. Supports optional `metadata` parameter to filter sources by `source_title` or `source_type`.\n* `/search/retrieve` \u2014 Hybrid search without AI generation. Returns structured search results for custom processing.\n  \u2013 `/search/full-text-search` \u2013 Perform a full text search without AI generation. Allows you to use operators like logical `AND`, `OR`\n\n### **Knowledge Management**\n\nBrowse, fetch, and manage your knowledge base.\n\n* `/list/sources` \u2014 Browse all indexed sources\n* `/list/sources_by_id` \u2014 Get specific sources by ID\n* `/fetch/fetch_content` \u2014 Retrieve file content and download URLs\n* `/delete_source` \u2014 Remove sources from knowledge base\n\n### **Update & Upsert**\n\nUpdate existing content and embeddings. If a `source_id` does not exist, these endpoints upsert (create or update).\n\n* `/upload/update_text` \u2014 Upsert markdown/text content by `source_id`\n* `/upload/update_document` \u2014 Upsert a file/document by `source_id`\n* `/upload/update_webpage` \u2014 Re-scrape and upsert a webpage by `source_id` and `web_url`\n* `/upload/update_embeddings` \u2014 Update existing embeddings by `chunk_id` within a batch/source\n\n### **Embeddings**\n\nManage and query pre-computed embeddings.\n\n* `/upload/upload_embeddings` \u2014 Upload embeddings and get generated `chunk_ids`\n* `/embeddings/search` \u2014 Vector similarity search; returns nearest `chunk_ids` and scores\n* `/embeddings/by-chunk-ids` \u2014 Retrieve embedding vectors for specific `chunk_ids`\n* `/embeddings/delete` \u2014 Delete embeddings by `chunk_id`\n\n### **Tenant Management**\n\nCreate and monitor tenants for multi-tenant setups.\n\n* `/user/create_tenant` \u2014 Create a tenant (optionally provide `tenant_id`, or auto-generate)\n* `/embeddings/create_embeddings_tenant` \u2014 Create an embeddings-only tenant (sets `sub_tenant_id = tenant_id`); use when directly uploading/searching embeddings\n* `/tenant/stats` \u2014 Get tenant stats (object count, vector dimension, identifiers)\n\n### **User Memory**\n\nPersonalize, retrieve, and manage user-specific AI memories for advanced agentic workflows.\n\n* `/user_memory/list_user_memories` \u2014 Browse user memories\n* `/user_memory/retrieve_user_memory` \u2014 Get specific user memories\n* `/user_memory/add_user_memory` \u2014 Manually add user-specific memories\n* `/user_memory/generate_user_memory` \u2014 AI-generated personalized memories\n* `/user_memory/delete_user_memory` \u2014 Remove user memories\n\n## \ud83d\udca1 Best Practices\n\n* Use **sub-tenants** to support multi-user isolation in B2B use cases.\n* Leverage **metadata** (e.g., `source_title`, `source_type` in the QnA API) for fine-grained filtering and agentic retrieval.\n* Tune **search\\_alpha** and **recency\\_bias** to control relevance.\n* Enable **highlight\\_chunks** for chunk-level citations.\n\n---\n\n```\n\n```\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2024 Cortex AI\n        \n        All Rights Reserved.\n        \n        PROPRIETARY AND CONFIDENTIAL\n        \n        This software is the proprietary and confidential property of Cortex AI (\"the Company\").\n        Permission is hereby granted to authorized users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company.\n        \n        You may not, without the express written permission of the Company:\n        \n        1. Copy, modify, or create derivative works of the software.\n        2. Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party.\n        3. Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "The official Python SDK for the Cortex AI platform.",
    "version": "0.2.1",
    "project_urls": {
        "Documentation": "https://docs.usecortex.ai/",
        "Homepage": "https://www.usecortex.ai/"
    },
    "split_keywords": [
        "cortex",
        " ai",
        " sdk",
        " api",
        " generative ai",
        " rag"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a95bc7597fb24b4efb7b86497d6ae7a2fe12a0a30b6f192f87157e049c2a5aa6",
                "md5": "36a644ed6f86c1eadb91975f247592ea",
                "sha256": "2c139f04115a78ba03b4b25b4756cb75117e08cda3f35952ff4b3f4c72aad21a"
            },
            "downloads": -1,
            "filename": "usecortex_ai-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "36a644ed6f86c1eadb91975f247592ea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 81888,
            "upload_time": "2025-09-04T12:45:28",
            "upload_time_iso_8601": "2025-09-04T12:45:28.743429Z",
            "url": "https://files.pythonhosted.org/packages/a9/5b/c7597fb24b4efb7b86497d6ae7a2fe12a0a30b6f192f87157e049c2a5aa6/usecortex_ai-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fe8128206cd71e4900df1d05b88dc68d7205f5916df61358bed358dd0e89f8e3",
                "md5": "e4c173762b8a4e0a4bf9dfed573fffa8",
                "sha256": "992994ce0599667b7c4a81274f41af06baac4c3099036b66abcbfc928a448bc8"
            },
            "downloads": -1,
            "filename": "usecortex_ai-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e4c173762b8a4e0a4bf9dfed573fffa8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 46190,
            "upload_time": "2025-09-04T12:45:29",
            "upload_time_iso_8601": "2025-09-04T12:45:29.774094Z",
            "url": "https://files.pythonhosted.org/packages/fe/81/28206cd71e4900df1d05b88dc68d7205f5916df61358bed358dd0e89f8e3/usecortex_ai-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-04 12:45:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "usecortex-ai"
}
        
Elapsed time: 3.65251s