{"id":7017,"library":"aurelio-sdk","title":"Aurelio Platform SDK","description":"The Aurelio Platform SDK is a Python library (version 0.0.19) that simplifies interaction with the Aurelio Platform for document processing tasks. It enables developers to extract text from various sources (PDFs, URLs), intelligently chunk content, and generate embeddings. The library focuses on abstracting the complexities of AI-powered document pipelines, offering both synchronous and asynchronous clients. Its release cadence appears to be active with regular updates and feature enhancements.","status":"active","version":"0.0.19","language":"en","source_language":"en","source_url":"https://github.com/aurelio-labs/aurelio-sdk","tags":["SDK","document processing","AI","extraction","chunking","embeddings","LLM"],"install":[{"cmd":"pip install aurelio-sdk","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Asynchronous file operations","package":"aiofiles","optional":false},{"reason":"Colored terminal logging","package":"colorlog","optional":false},{"reason":"Data validation and settings management","package":"pydantic","optional":false},{"reason":"Utilities for requests library","package":"requests-toolbelt","optional":false},{"reason":"HTTP client for making API calls","package":"requests","optional":false},{"reason":"Asynchronous HTTP client for async operations","package":"aiohttp","optional":false},{"reason":"Loading environment variables from .env files","package":"python-dotenv","optional":true}],"imports":[{"note":"The primary client class is directly exposed at the top level of the package, not in a submodule.","wrong":"from aurelio_sdk.client import AurelioClient","symbol":"AurelioClient","correct":"from aurelio_sdk import AurelioClient"},{"note":"For asynchronous operations, the AsyncAurelioClient is available at the top level.","symbol":"AsyncAurelioClient","correct":"from aurelio_sdk import AsyncAurelioClient"}],"quickstart":{"code":"import os\nfrom aurelio_sdk import AurelioClient\nfrom dotenv import load_dotenv\n\n# Load environment variables from a .env file (optional, but good practice for API keys)\nload_dotenv()\n\n# Ensure your API key is set as an environment variable or passed directly\napi_key = os.environ.get(\"AURELIO_API_KEY\")\n\nif not api_key:\n    raise ValueError(\"AURELIO_API_KEY environment variable not set.\")\n\nclient = AurelioClient(api_key=api_key)\n\n# Example: Extract text from a URL\n# For a real file, replace with client.extract_file(file_path=\"your_document.pdf\")\ntry:\n    print(\"Attempting to extract text from a URL...\")\n    response = client.extract_url(\n        url=\"https://www.aurelio.ai/blog/building-with-openai-agents-sdk\",\n        model=\"aurelio-base\", # Use the new model names\n        wait=60 # Wait up to 60 seconds for completion\n    )\n\n    if response.status == \"completed\":\n        print(f\"Extraction Status: {response.status}\")\n        print(f\"Extracted Document ID: {response.document.id}\")\n        if response.chunks:\n            print(\"First chunk of extracted text:\")\n            print(response.chunks[0].text[:500] + \"...\") # Print first 500 chars\n        else:\n            print(\"No chunks extracted.\")\n    else:\n        print(f\"Extraction did not complete. Status: {response.status}. Message: {response.message}\")\n\nexcept Exception as e:\n    print(f\"An error occurred during extraction: {e}\")","lang":"python","description":"Initializes the AurelioClient with an API key from environment variables and demonstrates how to extract text from a URL. It also includes error handling and checks for the extraction status. Remember to replace the URL or use `extract_file` for local documents."},"warnings":[{"fix":"Replace `quality='high'` with `model='docling-base'` or `quality='low'` with `model='aurelio-base'`.","message":"The `quality` parameter (e.g., 'low', 'high') for document extraction models is deprecated. Use specific model names like `aurelio-base`, `docling-base`, or `gemini-2-flash-lite` instead.","severity":"deprecated","affected_versions":">=0.0.19"},{"fix":"Set the `wait` parameter to an appropriate timeout value for synchronous calls, or use the `AsyncAurelioClient` with explicit polling logic for more control over long-running tasks. Always check `response.status`.","message":"For large files or potentially long-running extraction requests, it's crucial to enable polling and implement robust error handling. If `wait` is not sufficiently long or polling is not configured, the client might return before the process completes.","severity":"gotcha","affected_versions":"All"},{"fix":"Use `AsyncAurelioClient` and `await` calls within an `async def` function for better performance when dealing with many concurrent requests or large file processing.","message":"The SDK offers both synchronous (`AurelioClient`) and asynchronous (`AsyncAurelioClient`) APIs. Choosing the right client is important for performance, especially in I/O-bound applications or when processing multiple documents concurrently.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Set the environment variable `export AURELIO_API_KEY=\"your_api_key_here\"` or pass the key directly: `client = AurelioClient(api_key=\"your_api_key_here\")`.","cause":"The `AurelioClient` constructor was called without a valid API key. The key must be passed directly or found in the `AURELIO_API_KEY` environment variable.","error":"ValueError: AURELIO_API_KEY environment variable not set."},{"fix":"Install the package using pip: `pip install aurelio-sdk`. Ensure your virtual environment is activated if you are using one.","cause":"The `aurelio-sdk` package is not installed in the current Python environment or the environment is not activated.","error":"ModuleNotFoundError: No module named 'aurelio_sdk'"},{"fix":"Update your code to use the new model names, e.g., `model='aurelio-base'` or `model='docling-base'` instead of `quality='low'` or `quality='high'`.","cause":"An older, deprecated 'quality' parameter value (e.g., 'high' or 'low') was used when calling an extraction method, instead of the new explicit model names.","error":"ValidationError: 'quality' is not a valid enumeration member; permitted: 'aurelio-base', 'docling-base', 'gemini-2-flash-lite'"}]}