Files
python-sdk/api.md
T

38 KiB

Hanzo

Methods:

Models

Methods:

OpenAI

Methods:

  • client.openai.create(endpoint) -> object
  • client.openai.retrieve(endpoint) -> object
  • client.openai.update(endpoint) -> object
  • client.openai.delete(endpoint) -> object
  • client.openai.patch(endpoint) -> object

Deployments

Methods:

  • client.openai.deployments.complete(model) -> object
  • client.openai.deployments.embed(model) -> object

Chat

Methods:

  • client.openai.deployments.chat.complete(model) -> object

Engines

Methods:

  • client.engines.complete(model) -> object
  • client.engines.embed(model) -> object

Chat

Methods:

  • client.engines.chat.complete(model) -> object

Chat

Completions

Methods:

Completions

Methods:

Embeddings

Methods:

Images

Generations

Methods:

  • client.images.generations.create() -> object

Audio

Speech

Methods:

  • client.audio.speech.create() -> object

Transcriptions

Methods:

Assistants

Methods:

  • client.assistants.create() -> object
  • client.assistants.list() -> object
  • client.assistants.delete(assistant_id) -> object

Threads

Methods:

  • client.threads.create() -> object
  • client.threads.retrieve(thread_id) -> object

Messages

Methods:

  • client.threads.messages.create(thread_id) -> object
  • client.threads.messages.list(thread_id) -> object

Runs

Methods:

  • client.threads.runs.create(thread_id) -> object

Moderations

Methods:

  • client.moderations.create() -> object

Utils

Types:

from hanzoai.types import UtilTokenCounterResponse, UtilTransformRequestResponse

Methods:

Model

Types:

from hanzoai.types import ConfigurableClientsideParamsCustomAuth, ModelInfo

Methods:

Info

Methods:

Update

Types:

from hanzoai.types.model import UpdateDeployment

Methods:

ModelGroup

Methods:

Routes

Methods:

  • client.routes.list() -> object

Responses

Methods:

  • client.responses.create() -> object
  • client.responses.retrieve(response_id) -> object
  • client.responses.delete(response_id) -> object

InputItems

Methods:

  • client.responses.input_items.list(response_id) -> object

Batches

Methods:

Cancel

Methods:

  • client.batches.cancel.cancel(batch_id, **params) -> object

Rerank

Methods:

FineTuning

Jobs

Methods:

Cancel

Methods:

  • client.fine_tuning.jobs.cancel.create(fine_tuning_job_id) -> object

Credentials

Types:

from hanzoai.types import CredentialItem

Methods:

  • client.credentials.create(**params) -> object
  • client.credentials.list() -> object
  • client.credentials.delete(credential_name) -> object

VertexAI

Methods:

  • client.vertex_ai.create(endpoint) -> object
  • client.vertex_ai.retrieve(endpoint) -> object
  • client.vertex_ai.update(endpoint) -> object
  • client.vertex_ai.delete(endpoint) -> object
  • client.vertex_ai.patch(endpoint) -> object

Gemini

Methods:

  • client.gemini.create(endpoint) -> object
  • client.gemini.retrieve(endpoint) -> object
  • client.gemini.update(endpoint) -> object
  • client.gemini.delete(endpoint) -> object
  • client.gemini.patch(endpoint) -> object

Cohere

Methods:

  • client.cohere.create(endpoint) -> object
  • client.cohere.retrieve(endpoint) -> object
  • client.cohere.update(endpoint) -> object
  • client.cohere.delete(endpoint) -> object
  • client.cohere.modify(endpoint) -> object

Anthropic

Methods:

  • client.anthropic.create(endpoint) -> object
  • client.anthropic.retrieve(endpoint) -> object
  • client.anthropic.update(endpoint) -> object
  • client.anthropic.delete(endpoint) -> object
  • client.anthropic.modify(endpoint) -> object

Bedrock

Methods:

  • client.bedrock.create(endpoint) -> object
  • client.bedrock.retrieve(endpoint) -> object
  • client.bedrock.update(endpoint) -> object
  • client.bedrock.delete(endpoint) -> object
  • client.bedrock.patch(endpoint) -> object

EuAssemblyai

Methods:

  • client.eu_assemblyai.create(endpoint) -> object
  • client.eu_assemblyai.retrieve(endpoint) -> object
  • client.eu_assemblyai.update(endpoint) -> object
  • client.eu_assemblyai.delete(endpoint) -> object
  • client.eu_assemblyai.patch(endpoint) -> object

Assemblyai

Methods:

  • client.assemblyai.create(endpoint) -> object
  • client.assemblyai.retrieve(endpoint) -> object
  • client.assemblyai.update(endpoint) -> object
  • client.assemblyai.delete(endpoint) -> object
  • client.assemblyai.patch(endpoint) -> object

Azure

Methods:

  • client.azure.create(endpoint) -> object
  • client.azure.update(endpoint) -> object
  • client.azure.delete(endpoint) -> object
  • client.azure.call(endpoint) -> object
  • client.azure.patch(endpoint) -> object

Langfuse

Methods:

  • client.langfuse.create(endpoint) -> object
  • client.langfuse.retrieve(endpoint) -> object
  • client.langfuse.update(endpoint) -> object
  • client.langfuse.delete(endpoint) -> object
  • client.langfuse.patch(endpoint) -> object

Config

PassThroughEndpoint

Types:

from hanzoai.types.config import PassThroughEndpointResponse, PassThroughGenericEndpoint

Methods:

Test

Methods:

  • client.test.ping() -> object

Health

Methods:

Active

Methods:

Settings

Methods:

Key

Types:

from hanzoai.types import (
    BlockKeyRequest,
    GenerateKeyResponse,
    KeyListResponse,
    KeyBlockResponse,
    KeyCheckHealthResponse,
)

Methods:

Regenerate

Types:

from hanzoai.types.key import RegenerateKeyRequest

User

Types:

from hanzoai.types import UserCreateResponse

Methods:

Team

Types:

from hanzoai.types import (
    BlockTeamRequest,
    Member,
    TeamCreateResponse,
    TeamAddMemberResponse,
    TeamUpdateMemberResponse,
)

Methods:

Model

Methods:

Callback

Methods:

  • client.team.callback.retrieve(team_id) -> object
  • client.team.callback.add(team_id, **params) -> object

Organization

Types:

from hanzoai.types import (
    OrgMember,
    OrganizationCreateResponse,
    OrganizationUpdateResponse,
    OrganizationListResponse,
    OrganizationDeleteResponse,
    OrganizationAddMemberResponse,
    OrganizationUpdateMemberResponse,
)

Methods:

Info

Types:

from hanzoai.types.organization import InfoRetrieveResponse

Methods:

Customer

Types:

from hanzoai.types import BlockUsers, CustomerListResponse, CustomerRetrieveInfoResponse

Methods:

Spend

Types:

from hanzoai.types import SpendListLogsResponse, SpendListTagsResponse

Methods:

Global

Spend

Types:

from hanzoai.types.global_ import SpendListTagsResponse, SpendRetrieveReportResponse

Methods:

Provider

Types:

from hanzoai.types import ProviderListBudgetsResponse

Methods:

Cache

Types:

from hanzoai.types import CachePingResponse

Methods:

Redis

Methods:

Guardrails

Types:

from hanzoai.types import GuardrailListResponse

Methods:

Add

Types:

from hanzoai.types import IPAddress

Methods:

Delete

Methods:

Files

Methods:

  • client.files.create(provider, **params) -> object
  • client.files.retrieve(file_id, *, provider) -> object
  • client.files.list(provider, **params) -> object
  • client.files.delete(file_id, *, provider) -> object

Content

Methods:

  • client.files.content.retrieve(file_id, *, provider) -> object

Budget

Types:

from hanzoai.types import BudgetNew

Methods: