OpenAPI Specification

The complete Banklyze API is described by an OpenAPI 3.1 specification. Use it to generate client libraries, import into API tools, or explore endpoints interactively.

Specification URL

The OpenAPI 3.1 spec is always available at:

https://api.banklyze.com/openapi.json

Download the spec locally with cURL:

Download spec
curl -o openapi.json https://api.banklyze.com/openapi.json

Generate a TypeScript Client

Use openapi-typescript to generate type definitions, then pair with openapi-fetch for a fully typed API client with zero runtime overhead.

Generate TypeScript types
# Install openapi-typescript
npm install -D openapi-typescript

# Generate types from the live spec
npx openapi-typescript https://api.banklyze.com/openapi.json -o src/lib/api/banklyze.d.ts

# Or from a local file
npx openapi-typescript openapi.json -o src/lib/api/banklyze.d.ts
Typed client usage
# Install openapi-fetch for a fully typed client
npm install openapi-fetch

# Usage in your TypeScript project
import createClient from 'openapi-fetch';
import type { paths } from './lib/api/banklyze';

const client = createClient<paths>({
  baseUrl: 'https://api.banklyze.com/v1',
  headers: {
    Authorization: 'Bearer sk_live_abc123',
  },
});

// Fully typed request and response
const { data, error } = await client.GET('/deals', {
  params: { query: { page: 1, per_page: 25 } },
});

Generate a Python Client

Use openapi-python-client to generate a fully typed Python client with models, async support, and proper error handling.

Generate Python client
# Install openapi-python-client
pip install openapi-python-client

# Generate a Python client from the spec
openapi-python-client generate \
  --url https://api.banklyze.com/openapi.json \
  --output-path banklyze-client

Banklyze also provides an official Python SDK at pip install banklyze which is hand-crafted for the best developer experience. The generated client is useful if you prefer auto-generated code or need to stay exactly in sync with the spec.

Use with API Tools

The OpenAPI spec works with all major API development tools. Import it into Postman, Swagger UI, Insomnia, or any OpenAPI-compatible tool.

Postman import
# Download the spec
curl -o openapi.json https://api.banklyze.com/openapi.json

# Then in Postman:
# 1. Click "Import" in the top-left
# 2. Drag the openapi.json file or paste the URL directly
# 3. Postman auto-generates a complete collection with all endpoints

You can also paste https://api.banklyze.com/openapi.json directly into the Postman import dialog — no need to download the file first. Postman will generate a complete collection with all endpoints, request bodies, and example responses.

Interactive Explorer

FastAPI automatically serves an interactive Swagger UI at api.banklyze.com/docs and a ReDoc version at api.banklyze.com/redoc. These are built directly from the same OpenAPI spec and always reflect the live API.