Skip to main content

Equos.ai official Python SDK.

Project description

Equos Python SDK

Equos.ai official Python SDK.

Prerequisites

  • Go to Equos Studio.
  • Create an organization.
  • Create an API Key.

Installation

pip install equos

Features

  • Official Python SDK for Equos.ai
  • High-level EquosClient grouped by resource (brains, characters, faces, voices, conversations, knowledge_bases, organizations, tokens, health)
  • Sync and async variants for every endpoint
  • Type-safe generated models for all request / response bodies
  • Escape hatch to the low-level generated client for full httpx customization

Quick Start

import os
from equos import EquosClient

client = EquosClient(api_key=os.environ["EQUOS_API_KEY"])

# Health check
print(client.health.check())

# List the first 20 brains
print(client.brains.list())

You don't have an API key? Create one here.

Configuration

By default the client targets https://api.equos.ai. Override the endpoint via EquosOptions:

from equos import EquosClient, EquosOptions

client = EquosClient(
    api_key=os.environ["EQUOS_API_KEY"],
    options=EquosOptions(endpoint="https://develop-api.equos.ai"),
)

API Groups

Every group is available on the EquosClient instance. Each method has an async counterpart suffixed with _async.

client.brains

Method Description
list(take=20, skip=0, client_query=UNSET) List brains
get(id) Get a brain by id
create(body) Create a brain (CreateEquosBrainRequest)
update(id, body) Update a brain (CreateEquosBrainRequest)
delete(id) Delete a brain

client.characters

Method Description
list(take=20, skip=0, client_query=UNSET) List characters
get(id) Get a character
create(body) Create a character (CreateEquosCharacterRequest)
update(id, body) Update a character (UpdateEquosCharacterRequest)
delete(id) Delete a character

client.faces

Method Description
list(take=20, skip=0, client_query=UNSET) List faces
get(id) Get a face
create(body) Create a face (CreateEquosFaceRequest)
delete(id) Delete a face

client.voices

Method Description
list(take=20, skip=0, client_query=UNSET) List voices
get(id) Get a voice
create(body) Create a voice (CreateEquosVoiceRequest)
update(id, body) Update a voice (CreateEquosVoiceRequest)
delete(id) Delete a voice

client.conversations

Method Description
list(take=20, skip=0, client_query=UNSET) List conversations
get(id) Get a conversation
start(body) Start a conversation (CreateEquosConversationRequest)
stop(id) Stop a conversation

client.knowledge_bases

Method Description
list(take=20, skip=0, client_query=UNSET) List knowledge bases
get(id) Get a knowledge base
create(body) Create a knowledge base (CreateKnowledgeBaseRequest)
delete(id) Delete a knowledge base
add_document(id, body) Add a document (CreateDocumentRequest)
index_document(id, doc) Index a document
delete_document(id, doc) Delete a document

client.organizations

Method Description
get_freemium_usage() Get the freemium usage for the current org

client.tokens

Method Description
create(body) Create a short-lived access token (CreateEquosTokenRequest)

client.health

Method Description
check() Health check

Examples

Create and Fetch a Brain

from equos import EquosClient
from equos.models import CreateEquosBrainRequest

client = EquosClient(api_key="YOUR_API_KEY")

created = client.brains.create(CreateEquosBrainRequest(name="My Brain"))
print(created.id, created.name)

fetched = client.brains.get(created.id)
print(fetched)

Start a Conversation

from equos import EquosClient
from equos.models import CreateEquosConversationRequest

client = EquosClient(api_key="YOUR_API_KEY")

conversation = client.conversations.start(
    CreateEquosConversationRequest(character_id="chr_...")
)
print(conversation.id, conversation.token)

Async Usage

Every method has an _async variant that returns a coroutine:

import asyncio
from equos import EquosClient

async def main():
    client = EquosClient(api_key="YOUR_API_KEY")
    brains = await client.brains.list_async(take=50)
    print(brains)

asyncio.run(main())

Pagination and Filtering

list* endpoints accept take, skip, and client_query:

page = client.characters.list(take=50, skip=0, client_query="external-user-123")

Models and Types

All generated request / response models are re-exported for convenience:

from equos.models import (
    CreateEquosBrainRequest,
    CreateEquosCharacterRequest,
    CreateEquosConversationRequest,
    CreateEquosFaceRequest,
    CreateEquosVoiceRequest,
    CreateKnowledgeBaseRequest,
    CreateDocumentRequest,
    CreateEquosTokenRequest,
    # ...and all response models
)

from equos.types import UNSET, Unset, Response

Low-Level Client

For fine-grained control or endpoints not yet surfaced on EquosClient, use the generated client directly:

from equos.client import AuthenticatedClient
from equos.client.api.brain import get_brain

auth_client = AuthenticatedClient(
    base_url="https://api.equos.ai",
    token="YOUR_API_KEY",
    auth_header_name="x-api-key",
    prefix="",
)

with auth_client as c:
    brain = get_brain.sync(id="brain_id", client=c)
    print(brain)

Each generated endpoint module exposes four callables:

  • sync(...) — parsed response, or None
  • sync_detailed(...)Response[Parsed] with status / headers / content
  • asyncio(...) / asyncio_detailed(...) — async variants

Advanced httpx Customization

import httpx
from equos.client import AuthenticatedClient

auth_client = AuthenticatedClient(
    base_url="https://api.equos.ai",
    token="YOUR_API_KEY",
    auth_header_name="x-api-key",
    prefix="",
    httpx_args={"timeout": 30.0, "proxies": "http://localhost:8030"},
)

# Or swap in your own httpx.Client
auth_client.set_httpx_client(httpx.Client(base_url="https://api.equos.ai"))

Changelog

See Releases for version history.

Other Equos SDKs

SDK Platform Package
@equos/browser-sdk Browser (vanilla JS/TS) npm
@equos/react Browser (React) npm
@equos/node-sdk Node.js (server-side only) npm
equos Python (server-side only) PyPI

Reach Us

Documentation

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

equos-3.1.5.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

equos-3.1.5-py3-none-any.whl (96.5 kB view details)

Uploaded Python 3

File details

Details for the file equos-3.1.5.tar.gz.

File metadata

  • Download URL: equos-3.1.5.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for equos-3.1.5.tar.gz
Algorithm Hash digest
SHA256 0ebbb76f9063b55e60dba1b8fb279e61c2a9970746ea9bbd60f5453a0babb181
MD5 37550008ea575bfcbe7f2da1fa2188dd
BLAKE2b-256 555ced1fc0b44cd55bf82867fc6e17e843aebe53a468d5eefaf7ee778d5b7cf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for equos-3.1.5.tar.gz:

Publisher: publish.yml on EquosAI/equos-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file equos-3.1.5-py3-none-any.whl.

File metadata

  • Download URL: equos-3.1.5-py3-none-any.whl
  • Upload date:
  • Size: 96.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for equos-3.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eba367405c6953b7c64b2f4428b286086319ad97be79e0a577900d2fedc24815
MD5 094a07ca0dd336d3dc9e8e4bd648068e
BLAKE2b-256 0664517fd19c0452f89e5bbef3473363a7431bcef53d23ae7ee051879fc4714d

See more details on using hashes here.

Provenance

The following attestation bundles were made for equos-3.1.5-py3-none-any.whl:

Publisher: publish.yml on EquosAI/equos-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page