Skip to main content
Deutero is synchronous and AsyncDeutero is its asyncio counterpart. They expose the same resources, and every method takes the same arguments; on AsyncDeutero each method is a coroutine.

Constructor

str
Your Deutero API key. Falls back to the DEUTERO_API_KEY environment variable. Raises ValueError if neither is set.
str
default:"https://dashboard.deutero.ai/study-api"
Override the API root.
float
default:"120"
Request timeout in seconds. Not applied to a client you pass as http_client.
httpx.Client
A preconfigured client. AsyncDeutero takes an httpx.AsyncClient. The SDK adds the API key header and, if the client has no base_url, its own.
See Configuration for examples.

Resources

Methods

health()

Liveness check (GET /health). Doesn’t require a valid API key. Returns the raw JSON body.

close()

Closes the underlying connection pool. On AsyncDeutero, await client.close(). A client you passed as http_client is left open.

Context manager

The pool is closed on exit.

Conventions

  • IDs accept str or uuid.UUID.
  • Keyword arguments left as None aren’t sent, so the server default applies, and on updates the field is unchanged.
  • Enum arguments accept the enum member or its string value.
  • Responses are Pydantic models. Errors raise exceptions.