Once the server is running, visit:
http://localhost:3000/api-docs
Or simply navigate to the root URL and you'll be automatically redirected:
- Full OpenAPI 3.0 specification
- Detailed descriptions of all endpoints
- Request/response schemas
- Parameter definitions
- Try it out functionality for every endpoint
- Test API calls directly from your browser
- See real responses without writing code
- Test authentication
- Pre-configured request examples
- Multiple scenarios for each endpoint
- Copy-paste ready code snippets
- Configure Bearer token authentication
- Test authorized and unauthorized requests
- See authentication errors in real-time
- Click on any endpoint to expand it
- View request parameters and body schemas
- See response examples
- Click "Try it out" on any endpoint
- Fill in the required parameters
- If API_KEY is set, click "Authorize" and enter your Bearer token
- Click "Execute"
- View the response
- Swagger UI shows
curlcommands - Copy and use in your terminal
- Adapt for your programming language
{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
],
"temperature": 0.7,
"max_tokens": 100
}Simply click "Execute" on the GET /v1/models endpoint - no parameters needed!
Set "stream": true in your chat completion request to test Server-Sent Events.
The Swagger UI is organized into these sections:
- Health - Health check endpoints
- Models - Model management
- Chat - Chat completion operations
- Completions - Legacy completion operations
- Embeddings - Embedding operations (not supported)
- Collapse/Expand All: Use the buttons at the top
- Filter by Tag: Click on section names to filter
- Dark Mode: Built into Swagger UI
- Mobile Friendly: Works on all devices
The Swagger UI is configured to:
- Hide the top bar for cleaner appearance
- Use custom site title
- Include all available models
- Show request/response examples
The raw OpenAPI specification is available in src/swagger.ts and can be exported for:
- API documentation generation
- Client SDK generation
- API gateway configuration
- Testing tools integration
Enjoy exploring the API! 🚀