Integrate AnyInfer¶
Choose the boundary that fits your application. All three production paths use the same core behavior and shared configuration file.
Not every application needs this layer. Read when to use AnyInfer first if a provider-switching client, organization gateway, or dedicated local server may already solve your whole problem.
| Path | Use it when | Start here |
|---|---|---|
| Python SDK | AnyInfer runs inside your Python process and you want the full typed API. | Integrate the Python SDK |
| Command-line tool | A person or shell script needs one result and no long-running service. | Run a prompt from the shell |
| OpenAI-compatible sidecar | A non-Python application or existing OpenAI client needs AnyInfer over HTTP. | Run the sidecar |
If you are still deciding, read choosing an integration path. The quickstart is the shortest SDK path from installation to a result.
Python tasks¶
- Stream typed events
- Enforce a JSON schema
- Add a fallback chain
- Run the tool loop
- Fit a corpus to a budget
Operations¶
- Choose and download a local model
- Run a local model end to end
- Observe requests and bridge to OpenTelemetry
- Store credentials in the OS keyring
Evaluate before integrating¶
The demo app is a reference integration that runs offline against deterministic fake providers. It demonstrates streaming, fallback, structured output, and telemetry without requiring an account or credential.
These pages are for integrators. If you are changing AnyInfer itself, start with the contributor guide; contributor architecture and release material is kept in its own section so it does not interrupt the integration path.