serviceinfo - Haidra-Org/AI-Horde GitHub Wiki

The .well-known/serviceinfo is a new standard created in collaboration between the developers of the AI Horde, koboldcpp and aphrodite. It is meant to allow inference integrators to our APIs to quickly retrieve the information about the API they are working with.

This page will details the latest version of the standard.

serviceinfo 0.2

You can find an OpenAPI specification here

The result should be a json document like in the below example

{
        "version": "0.2",
        "software": {
            "name": "software name,
            "version": "software version",
            "repository": "https://domain/gitrepo",
            "homepage": "https://homedomain",
            "logo": "https://url.to.logo.png",
        },
        "api": {
            "api stub": {
                "name": "API Name",
                "version": "API version",
                "base_url": "https://domain/path/to/api",
                "rel_url": "/path/to/api",
                "documentation": "/path/to/apidoc",
            },
        },
    }
  • "version": (Mandatory) In the root of the json is the version of the serviceinfo used itself.
  • "software": (Mandatory) describes the software and the version serving the API. This can be used by developers to know the functionality to expect.
    • "name": (Mandatory) The name of the software
    • "version": (Mandatory) The version of the software. This is important to know what features to expect.
    • "repository": (Mandatory) The url where this software source code can be found.
    • "homepage": (Mandatory) A url to the homepage for this software. This can be the same as url if nothing else exists.
    • "logo": (Optional) A url to an image with the software logo.
  • "api": This dictionary contains the list of APIs served by this software. Each API should use a standardized stub of the API name as the key. For example aihorde, openai and koboldai. This is to allow developers to seek and know which API they're interacting with
    • "name": (Mandatory) The name of the software API. This is just for information.
    • "version": (Mandatory) The version of that API which the software implements. This can inform the developers of which endpoints exists and how they work
    • "base_url": (Optional) The absolute url to the API base. This is for information purposes.
    • "rel_url": (Mandatory) A relative url to the API base. This is for information purposes.
    • "documentation": (Mandatory) A relative or absolute url to the API documentation. This is to help the developers know where to find information on how the API works. This can link to external sites if the API is not self-documenting.

Why both base_url and rel_url.

The reason why we decided to support relative url is because some software serves their endpoint from a user's PC behind reverse proxy such as cloudflare. by only allowing base_url it might cause the user's IP to leak to the people with whom their shared their reverse proxy domain. By making only rel_url mandatory, it allows such software to provide a link to the API in the serviceinfo without risking such leaks.

Improving/Extensing the standard

If you think this standard should be improved/extended, please contact the people behind it and we'll be happy to workshop it with you. You can find all us typically in this discord channel or you can also use the following contact info