secure( SecurityScheme::http('bearer', 'API-Key') ); // Add development server $openApi->servers = [ new Server('http://localhost', 'Local Development'), ]; // Add comprehensive API description $openApi->info->description = " # Laravel LLM Gateway API Multi-provider LLM Gateway supporting OpenAI, Anthropic, Google Gemini, DeepSeek, and Mistral AI. ## Authentication All API requests require authentication via API key in the `Authorization` header: ``` Authorization: Bearer llmg_your_api_key_here ``` Gateway users receive API keys from the admin interface. Each key is linked to a specific gateway user with their own budget limits, rate limits, and provider credentials. ## Providers - **openai** - OpenAI models (GPT-4, GPT-3.5-turbo, etc.) - **anthropic** - Anthropic Claude models (Claude 4, Claude 3.5 Sonnet, etc.) - **google** - Google Gemini models (Gemini Pro, Gemini Flash, etc.) - **deepseek** - DeepSeek models (DeepSeek Chat, DeepSeek Coder) - **mistral** - Mistral AI models (Mistral Large, Mistral Medium, etc.) ## Rate Limits Each gateway user has configurable rate limits (default: 60 requests/hour). Rate limit information is returned in error responses when exceeded. ## Budgets Monthly budget limits are enforced per gateway user. Costs are calculated based on token usage and provider-specific pricing. ## Error Handling The API returns structured error responses: - **400**: Bad Request - Invalid parameters - **401**: Unauthorized - Invalid or missing API key - **402**: Payment Required - Budget exceeded - **403**: Forbidden - User blocked - **429**: Too Many Requests - Rate limit exceeded - **500**: Internal Server Error - Unexpected error "; }); } }