Omono API
Menu Build with AI

Build with AI assistants

View as Markdown

AI assistants and coding tools, which run on large language models (LLMs), can help you build your Omono integration faster, as long as they read the right documentation. Every guide page and every section of the API reference is also available as Markdown, a plain-text format that AI tools read well, so you can give your assistant exactly the pages it needs.

Copy a page for your assistant#

At the top of every guide page, every error page and every section of the API reference, there are two buttons:

  • Copy for LLM copies the page as Markdown. Paste it into a chat with your assistant, and it has the same information you see on the page.
  • View as Markdown opens the Markdown in your browser, so you can read it or link to it.

Each operation in the API reference also has a Copy as Markdown button, which copies that one operation.

Point your tools at llms.txt#

/docs/llms.txt lists every Markdown page of these docs, with a short description of each one. It follows the llms.txt convention, which some AI tools look for. Give your assistant its full address on the host you use, for example https://api.omono.co/docs/llms.txt, and it can fetch the pages it needs.

Give it everything at once#

/docs/llms-full.txt holds every guide, the whole API reference and every error code in one file. It's more than 100,000 words long, so use it with tools that can read long documents, or when you want your assistant to search the whole API.

Generate code from the OpenAPI document#

The OpenAPI document describes every operation, parameter and field in a form that software can read. Code generators and many AI coding tools can use it to build a client for the API, with a type for every object. Client libraries lists the generators that Omono has tested, with the command and a short example for each, and the traps to avoid. Give that page to your assistant when it writes code with a generated client.

Every list of values in a response is open, because Omono can add a value at any time. So in the OpenAPI document, a response field such as a status is a plain string. Its description lists the values known today, and they're also in a separate schema whose name starts with Known, such as KnownOrderStatus. Requests use the Known schema, so they still accept only the known values. A generated client reads these fields as strings, so it doesn't fail on a value it doesn't recognise, but make sure your own code copes with one.

Each list has a schema of its own, such as CompanyList, so a generated client gets a type for each list, with data as an array of its records.

Once the API is generally available, the operationId of each stable operation, and the names of the schemas and tags that stable operations use, stay the same within version 1, so a client you generate again keeps its method and type names. Until then, any of these names can change, and a beta operation's names can change at any time. The changelog lists each change. The compatibility policy explains what stays stable.

You don't need an API key to fetch the OpenAPI document, so never add one to its URL. As with any API request, Omono revokes a key at once if it finds one in the URL, as Authenticate your requests explains.

Use your assistant safely#

  • Give it the pages for the job. For example, give it the recipe you're following and the reference sections of the resources it uses, rather than the whole API.
  • Check what it writes. Compare the requests it builds with the API reference, and try them on a sandbox organisation before you use your live data.
  • Never paste an API key into a chat. Keep your keys in a secrets manager, and let your code read them from there. Check that the code your assistant writes sends the key only in the Authorization header, never in a URL or in X-Request-Id.
  • Fetch the Markdown again when you start new work. It changes whenever these docs change, so an old copy can miss new fields or rules. The changelog lists every change to the API, so check it for anything that's changed since you last fetched the pages.