> For the complete documentation index, see [llms.txt](https://shinkalabs.gitbook.io/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shinkalabs.gitbook.io/hub/andromeda/sdks-and-tooling/codegen.md).

# OpenAPI codegen

The API ships an OpenAPI 3.1 document at <https://api.andromedainfra.pro/openapi.json>, generated from the live route catalogue. Feed it to a generator to get a typed client in your language.

## Generate a client

Point any OpenAPI generator at the spec URL. For example, with `openapi-generator`:

```bash
openapi-generator-cli generate \
  -i https://api.andromedainfra.pro/openapi.json \
  -g typescript-fetch \
  -o ./andromeda-client
```

Swap `-g typescript-fetch` for `go`, `python`, `rust`, `java`, or whatever you need. Other tools (`oapi-codegen` for Go, `openapi-python-client`, etc.) work the same way: input is the URL.

## Wire in auth

The generated client takes an `X-Api-Key` header. Set it from an environment variable; never hard-code a key.

## Keep it current

Regenerate when you upgrade. The spec is the source of truth, and routes scheduled for removal carry `Deprecation` / `Sunset` headers, so a regen surfaces changes early.

## What you do not get from codegen

* The two custody-free patterns still need you to sign things yourself: `prepare -> submit` (you sign the returned transaction) and `challenge -> submit` (the user signs the 32-byte challenge). A generated client gives you typed calls, not the signing.
* For the policy surface specifically, Andromeda can give you a typed TypeScript client tailored to a deployed policy; see [Typed TypeScript client](/hub/andromeda/sdks-and-tooling/ts-client.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shinkalabs.gitbook.io/hub/andromeda/sdks-and-tooling/codegen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
