> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deutero.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deutero Python SDK

> Run AI-moderated research interviews from Python: design studies, recruit participants, rehearse with AI personas and analyze what people said.

The `deutero` package is the official Python client for the [Deutero](https://deutero.ai) Study Management API. It covers the full study lifecycle, so anything you can do in the dashboard you can script, schedule or wire into your own product.

```python theme={null}
from deutero import Deutero

client = Deutero()  # reads DEUTERO_API_KEY

project = client.projects.create(name="Onboarding research")
study = client.studies.create(project_id=project.id, name="Why new users drop off")
client.questions.generate(study.id, n_questions=8)
```

## What you can build

<CardGroup cols={2}>
  <Card title="Design studies" icon="pen-ruler" href="/guides/study-lifecycle">
    Create studies, draft them from a brief or a landing page, and write or generate the interview questions.
  </Card>

  <Card title="Branching interviews" icon="diagram-project" href="/guides/interview-flows">
    Author flows with conditional paths, captured variables, live data fetches and outbound signals.
  </Card>

  <Card title="Recruit and embed" icon="user-plus" href="/guides/recruitment-and-embedding">
    Share participation links, attribute arrivals to your own user IDs, or embed the interview in your app.
  </Card>

  <Card title="Rehearse with AI personas" icon="robot" href="/guides/simulations">
    Run simulated interviews against generated personas before a single real participant sees the study.
  </Card>

  <Card title="Analyze responses" icon="chart-scatter" href="/guides/analyzing-responses">
    Export transcripts, search answers semantically, tally scale and choice questions, and cluster free text into themes.
  </Card>

  <Card title="React to events" icon="bolt" href="/guides/receiving-webhooks">
    Verify signed webhooks when interviews start or complete, studies fill up or credits run out.
  </Card>
</CardGroup>

## Highlights

* **Sync and async.** `Deutero` and `AsyncDeutero` expose the same resources with identical signatures.
* **Typed responses.** Every call returns a Pydantic v2 model from `deutero.models`, and the package ships `py.typed` for mypy and pyright.
* **Specific exceptions.** HTTP errors map to classes such as `NotFoundError`, `ConflictError` and `InsufficientCreditsError`.
* **Webhook verification built in.** `deutero.webhooks` checks [Standard Webhooks](https://www.standardwebhooks.com) signatures without needing an API key.
* **Small footprint.** The only dependencies are `httpx` and `pydantic`. Requires Python 3.9+.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/get-started/quickstart">
    Install the SDK and run your first study end to end.
  </Card>

  <Card title="SDK reference" icon="book" href="/reference/client">
    Every resource, method, argument and return type.
  </Card>
</CardGroup>


## Related topics

- [Changelog](/changelog.md)
- [Error handling](/guides/error-handling.md)
- [Models and enums](/reference/models.md)
- [Exceptions](/reference/exceptions.md)
- [Quickstart](/get-started/quickstart.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.