Skip to main content

For AI agents: docs.octen.ai/integrations/python-sdk.md

Get API Key

Get your API key from the API Platform

PyPI

Download and view the SDK on PyPI

Install

Requires Python 3.8+

Quick Start

Decompose a query into sub-queries, search them concurrently, and get results grouped per sub-query. Best for comparisons, surveys, and multi-angle questions.
Search the live web and get ranked results with highlights and optional full content. Best for search bars, answer engines, and news lookup.
In beta — contact us for beta access. Search images by text query and/or a reference image; set topic="design" for UI design references. Best for image lookup, visual references, and design assets.
In beta — contact us for beta access. Search the web for videos by text query. Best for video lookup, clip discovery, and media previews.

Extract

Fetch 1-20 URLs in one call and return clean markdown or text. Best for reading pages, cleaning articles, and knowledge ingestion.

Model

Send messages to leading LLMs through one API, with optional web search via an OctenSearchTool in tools. Best for Q&A, chat assistants, and grounded answers.

Embedding

Create text embeddings with models of different sizes. Best for semantic search, RAG, and recommendations.

VL Embedding

Create multimodal embeddings from text, images, and videos. Best for cross-modal search and visual retrieval.

Async

Use AsyncOcten for async operations. Every resource mirrors the sync client.

Error Handling

Requests that fail due to timeouts, rate limits, or server errors (5xx) are automatically retried with exponential backoff.