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

# SDKs & client libraries

> Maintained clients, generated libraries, and the OpenAPI source for agent-generated clients.

Prefer the maintained Python SDK or CLI. The other packages are generated from
the OpenAPI spec and receive lighter maintenance.

| Client | Install | Source |
| - | - | - |
| Python | `pip install legnext` | [`legnext` on PyPI](https://pypi.org/project/legnext/) |
| CLI | `brew install legnext-ai/tap/legnext` or `npx @legnext/cli` | [`legnext-ai/legnext-cli`](https://github.com/legnext-ai/legnext-cli) |
| JavaScript / TypeScript | `npm install @legnext-api/js-sdk` | [`sdks/javascript`](https://github.com/legnext-ai/sdks/tree/master/sdks/javascript) |
| Go | `go get github.com/legnext-ai/sdks/sdks/go` | [`sdks/go`](https://github.com/legnext-ai/sdks/tree/master/sdks/go) |
| Ruby | `gem install legnext-ruby-sdk` | [`sdks/ruby`](https://github.com/legnext-ai/sdks/tree/master/sdks/ruby) |
| Rust | `cargo add legnext-rust-sdk` | [`sdks/rust`](https://github.com/legnext-ai/sdks/tree/master/sdks/rust) |
| C# / .NET | `dotnet add package Legnext.SDK` | [`Legnext.SDK` on NuGet](https://www.nuget.org/packages/Legnext.SDK) |

## Generate a client with your agent

For another language, give your coding agent the
[public OpenAPI spec](https://docs.legnext.ai/openapi.yaml) and
the [agent-ready reference corpus](https://docs.legnext.ai/llms-full.txt).
Ask it to keep `LEGNEXT_API_KEY` server-side and implement the complete
submit → wait → persist flow.

> [!NOTE]
>
> Generation tasks are asynchronous. Poll
> [`GET /v1/job/{job_id}`](https://docs.legnext.ai/api-reference/task-management/get-task) or use a
> webhook, then download outputs before their remote URLs expire.

> [!NOTE]
>
> The PHP client source exists on GitHub but is not listed here until its Composer
> package is publicly installable.


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