aito.client.v2.client

A client for the Aito v2 API

v2 is a different API, not a version bump, so it is a different client class. The reasoning is written down in docs/v2-client-design.md; the short form:

  • One engine, named endpoints. _query is the universal surface, and _predict / _search / _recommend / _relate are enforced shortcuts for it — the server rejects a body whose mode does not match the endpoint, naming the right one. This client addresses the named endpoints so that check works for you, and query() is the escape hatch.

  • Collections vs legacy tables. type: collection is v2’s native table; anything created through v1 is a legacy table answered by a compatibility shim. Both are queryable through v2, and a few responses differ in shape between them — handled in aito.client.v2.responses.

  • Environments in the URL path. An environment is addressed as /db/<db>/env/<name>/api/v2/.... There is no env-scoped key; the database key authorizes every environment.

Classes

AitoClientV2(instance_url, api_key[, env, ...])

A client that connects to the Aito v2 API