Skip to main content
This SDK helps you use the AI Search API in your Python projects.
It gives you semantic search, context support, and flexible outputs with a simple Pythonic interface.
👉 To start, get your free API key from the AI Search API dashboard.

Features

  • 🔍 AI-Powered Semantic Search – Use advanced embeddings for natural language queries
  • 🎯 Context Awareness – Add chat-like history for smarter results
  • Simple API Client – Clean Python interface with error handling
  • 🛡️ Type Safety – Full type hints for modern Python
  • 🔄 Flexible Output – Choose plain text or markdown responses
  • 💰 Usage Tracking – Monitor your credits anytime

Installation

Install from PyPI:
Or install from source:

Quick Start

Get Your API Key

  1. Sign up
  2. Log in
  3. Copy your API key from the dashboard.

Basic Usage Example


Advanced Usage

Custom Configuration


API Reference

AISearchAPIClient

Constructor

  • api_key: Get yours from the dashboard
  • base_url: Optional custom endpoint
  • timeout: Timeout in seconds

Methods

  • search(prompt, context=None, response_type=None) → Run an AI-powered search
  • balance() → Check available credits

Error Handling


Environment Variables

You can set your API key globally:
Then use it in Python:

Examples

  • Basic search and balance check
  • Contextual search with history
  • Async usage
  • Error handling
Find more examples in the examples/ folder.

Requirements

  • Python 3.8+
  • requests >= 2.25.0
  • typing-extensions >= 4.0.0 (if Python < 3.10)

Development


License

This project is licensed under the MIT License – see the LICENSE file.

Resources