Option 1: AI-Assisted Development with Swagger Docs
The fastest way to integrate Xano into a custom-coded app is to provide your auto-generated Swagger/OpenAPI spec to an AI coding assistant. The AI can then generate type-safe API clients, data fetching hooks, and full integration code based on your actual endpoints.Enabling Combined Swagger Documentation
Using with AI Coding Assistants
Claude Code
Claude Code
Claude Code is Anthropic’s CLI tool for AI-assisted development. You can provide your Swagger spec directly to Claude Code for it to generate integration code, API clients, and types.Claude Code will read the spec and generate accurate code matching your actual API endpoints, request bodies, and response types.
- Download your combined Swagger JSON spec from Xano and save it in your project (e.g.,
docs/xano-api.json). - Reference the spec when asking Claude Code to build your integration:
Cursor
Cursor
Cursor is an AI-powered IDE that can use your API documentation as context.
- Download your combined Swagger JSON spec and save it in your project directory.
- Add the spec file to your Cursor project context so the AI can reference it.
- Ask Cursor to generate API calls, hooks, or full pages — it will use the spec to produce accurate code.
GitHub Copilot
GitHub Copilot
GitHub Copilot can use your Swagger spec as context when generating code.
- Download your combined Swagger JSON spec and save it in your project.
- Open the spec file alongside the file you’re working in, or reference it in Copilot Chat.
- Copilot will use the endpoint definitions to generate accurate API calls.
Option 2: Xano JS SDK
The Xano JS SDK provides helpers for authentication, API calls, and real-time features. It works in any JavaScript/TypeScript environment (browser, Node.js, etc.).Installation
Basic Usage
Authentication Flow Example
Option 3: Standard REST Calls (fetch / axios)
Xano APIs are standard REST endpoints. You can call them withfetch, axios, or any HTTP client in any language.
Fetch Example (TypeScript)
POST Example
Tips
- Environment variables — Store your Xano base URL and API group paths in environment variables rather than hardcoding them.
- Authentication — Most Xano APIs use JWT-based auth. Call your
auth/loginorauth/signupendpoint to get a token, then pass it in theAuthorization: Bearer <token>header. - Branching — Use Xano branches to develop and test backend changes without affecting your production frontend.
- CORS — Xano handles CORS automatically. If you run into issues, check your API group’s CORS settings.