OmniDim Logo

    Client

    The Client class is the main entry point for the OmniDimension SDK. It handles authentication, request management, and provides access to all API domains.

    Initialization

    To use the OmniDimension SDK, you first need to initialize the Client with your API key:

    1 2 3 4 5 6 import os from omnidimension import Client # Initialize with default production URL api_key = os.environ.get('OMNIDIM_API_KEY', 'your_api_key_here') client = Client(api_key)

    Client Structure

    The Client object provides access to different domains of the OmniDimension API through dedicated properties:

    1 2 3 4 5 client.agent # Agent operations client.call # Call operations client.integrations # Integration operations client.knowledge_base # Knowledge base operations client.phone_number # Phone number operations

    Agent

    Create, retrieve, update, and delete AI voice agents.

    View Agent documentation →

    Call

    Manage call logs and dispatch calls to phone numbers.

    View Call documentation →

    Integrations

    Create and manage integrations with external services.

    View Integrations documentation →

    Knowledge Base

    Upload, manage, and attach knowledge base files to agents.

    View Knowledge Base documentation →

    Phone Number

    List, attach, and detach phone numbers from agents.

    View Phone Number documentation →

    Error Handling

    The SDK provides an APIError class to handle API-specific errors. Here's how to use it:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 import os from omnidimension import Client, APIError api_key = os.environ.get('OMNIDIM_API_KEY', 'your_api_key_here') client = Client(api_key) try: # Make an API request response = client.agent.list() print(response) except APIError as e: print(f"API Error ({e.status_code}): {e.message}") except Exception as e: print(f"Unexpected error: {str(e)}")

    Client Parameters

    ParameterTypeRequiredDescription
    api_keystringYesYour OmniDimension API key for authentication
    base_urlstringNoThe base URL for the API. Defaults to the production URL.