Copyright © 2022-2026 basebox GmbH, all rights reserved.
Licensed to be used in conjunction with basebox, only.
Licensed to be used in conjunction with basebox, only.
// integration
OpenAI API Integration
Applies to
Product: Cloud · Server · Audience: Developer / Integrator
basebox's OpenAI-compatible API allows you to use any tool, library, or application designed for OpenAI's API with your basebox instance.
The OpenAI-compatible API is always available — it no longer needs to be switched on and is part of every basebox installation. For Anthropic models, basebox adds no extra instructions to requests.
🚀 Quick Start
New to the OpenAI API? Start here:
- Quickstart - API key, base URL and realm; your first chat completion with curl and the OpenAI SDK
- User Guide - Complete technical documentation with examples
- IDE Integration - Connect your favorite code editor to basebox
- OpenClaw Integration - Use basebox with OpenClaw for AI coding workflows
🎯 What Can You Do?
With the OpenAI-compatible API, you can:
- Use any OpenAI-compatible tool with the AI models in your basebox
- Integrate AI into your development workflow (VS Code, Zed, Neovim, etc.)
- Build custom applications using familiar OpenAI libraries
- Test and prototype with interactive Swagger UI
- Maintain privacy and control while using popular AI tools
- Use thinking modes through the API — see Thinking Modes
📖 Documentation Overview
For Beginners
- Quickstart - Start here
- Version 1.7 - The version that introduced the API
- User Guide - Getting Started - Get your first API token
For Developers
- User Guide - Complete API reference with curl examples
- Swagger UI Testing - Interactive API testing
- Common Mistakes - Avoid these pitfalls
For Tool Integration
- IDE Integration - Connect Zed, VS Code, Neovim, and more
- OpenClaw Integration - AI coding agent integration
🔧 Quick Examples
Test Your Connection
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
-H "X-Realm: YOUR_REALM" \
https://your-basebox.example.com/v1/models
Simple Chat Request
curl -X POST "https://your-basebox.example.com/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "X-Realm: YOUR_REALM" \
-d '{
"model": "claude-sonnet-4",
"messages": [
{"role": "user", "content": "Hello, what model are you?"}
]
}'
Interactive Testing
Visit https://your-basebox.example.com/v1/api/docs for Swagger UI testing interface.
🆘 Need Help?
- Error handling: status codes, messages and client behaviour under Error handling
- Troubleshooting: Check the troubleshooting section in the user guide
- Common Issues: Review common mistakes
- API Reference: Full details in the user guide
🌟 Popular Use Cases
- Code Assistance: Use GitHub Copilot, Cursor, or similar tools with your models
- Custom Applications: Build chatbots, content generators, or analysis tools
- Development Workflow: Integrate AI directly into your editor
- Team Tools: Create organization-specific AI-powered utilities
The interactive Swagger UI is available at /v1/api/docs on your basebox instance.
Next step: Quickstart · User Guide
Need help? Contact support