Skip to main content
The Avala API publishes a full OpenAPI 3.1 specification. You can use it to explore the API interactively, generate client libraries in any language, or integrate with API tooling like Postman and Insomnia.

Specification URL

The latest OpenAPI spec is always available at:
https://server.avala.ai/docs/api/openapi.json
You can download it directly:
curl -o openapi.json https://server.avala.ai/docs/api/openapi.json

Interactive Documentation

Browse the full API reference, try out requests, and inspect schemas in the interactive docs:

Code Generation

Use the OpenAPI spec to generate a typed client in your language of choice. Below are examples for popular code generators.

Python

Generate a Python client using openapi-python-client:
pip install openapi-python-client

openapi-python-client generate \
  --url https://server.avala.ai/docs/api/openapi.json \
  --output-path ./avala-client
This produces a fully typed Python package with Pydantic models and httpx-based HTTP methods.
from avala_client import Client
from avala_client.api.datasets import list_datasets

client = Client(base_url="https://server.avala.ai/api/v1")

response = list_datasets.sync(client=client)

TypeScript

Generate TypeScript types and a fetch client using openapi-typescript:
npx openapi-typescript https://server.avala.ai/docs/api/openapi.json \
  -o ./src/avala-api.d.ts
Then use the generated types with your preferred HTTP client:
import type { paths } from "./avala-api";
import createClient from "openapi-fetch";

const client = createClient<paths>({
  baseUrl: "https://server.avala.ai/api/v1",
  headers: {
    "X-Avala-Api-Key": process.env.AVALA_API_KEY!,
  },
});

const { data, error } = await client.GET("/datasets");

Go

Generate a Go client using oapi-codegen:
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest

oapi-codegen \
  -package avala \
  -generate types,client \
  https://server.avala.ai/docs/api/openapi.json > avala.gen.go
Then use the generated client:
package main

import (
	"context"
	"fmt"
	"os"

	"your-module/avala"
)

func main() {
	client, _ := avala.NewClientWithResponses(
		"https://server.avala.ai/api/v1",
		avala.WithRequestEditorFn(func(ctx context.Context, req *http.Request) error {
			req.Header.Set("X-Avala-Api-Key", os.Getenv("AVALA_API_KEY"))
			return nil
		}),
	)

	resp, _ := client.ListDatasetsWithResponse(context.Background())
	fmt.Println(resp.JSON200)
}

Other Tools

The OpenAPI spec works with any tool that supports the OpenAPI standard:
ToolUse Case
PostmanImport the spec to create a ready-made collection for testing.
InsomniaImport the spec for quick API exploration.
Swagger CodegenGenerate clients in 40+ languages.
StoplightBuild internal API docs and mocks from the spec.
The OpenAPI specification is updated automatically whenever the API changes. Always fetch the latest version from the spec URL to ensure your generated client stays in sync.