{"openapi":"3.1.0","info":{"title":"LLM API Gateway","description":"OpenAI-compatible REST API Gateway providing high-availability access to Google Gemini 3.8, 3.7, 3.6 & Anthropic Claude models with multi-account rotation and streaming.","version":"0.1.0"},"paths":{"/v1/api/health":{"get":{"summary":"Antigravity Health","operationId":"antigravity_health_v1_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/health":{"get":{"summary":"Antigravity Health","operationId":"antigravity_health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/runs":{"post":{"summary":"Create Hermes Run","operationId":"create_hermes_run_v1_runs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/runs/{run_id}":{"get":{"summary":"Get Hermes Run","operationId":"get_hermes_run_v1_runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"tags":["LLM API Gateway"]}},"/v1/runs/{run_id}/events":{"get":{"summary":"Get Hermes Run Events","operationId":"get_hermes_run_events_v1_runs__run_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"tags":["LLM API Gateway"]}},"/v1/runs/{run_id}/stop":{"post":{"summary":"Stop Hermes Run","operationId":"stop_hermes_run_v1_runs__run_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"tags":["LLM API Gateway"]}},"/v1/models":{"get":{"summary":"List Models","operationId":"list_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponse"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/chat/completions":{"post":{"summary":"Chat Completions","operationId":"chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/messages":{"post":{"summary":"Chat Completions","operationId":"chat_completions_v1_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/embeddings":{"post":{"summary":"Create Embeddings","operationId":"create_embeddings_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/images/generations":{"post":{"summary":"Create Image","operationId":"create_image_v1_images_generations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/auth":{"post":{"summary":"Status Auth","operationId":"status_auth_v1_status_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/data":{"get":{"summary":"Get Status Data","description":"Retrieve aggregate system and account status metrics, capacity forecasts, and burn rates.\n\nReturns:\n    JSON response with accounts list, fleet capacity totals, accuracy percentages,\n    and analytics summaries.","operationId":"get_status_data_v1_status_data_get","parameters":[{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/refresh":{"post":{"summary":"Refresh Status Data","operationId":"refresh_status_data_v1_status_refresh_post","parameters":[{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/accounts/oauth-start":{"post":{"summary":"Status Accounts Oauth Start","description":"Initiates a Google OAuth PKCE flow and returns authorization URL with signed state.","operationId":"status_accounts_oauth_start_v1_status_accounts_oauth_start_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OAuthStartRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/accounts/oauth-exchange":{"post":{"summary":"Status Accounts Oauth Exchange","description":"Exchanges an authorization code or callback URL for OAuth credentials and adds the account to the pool.","operationId":"status_accounts_oauth_exchange_v1_status_accounts_oauth_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/accounts/add-manual":{"post":{"summary":"Status Accounts Add Manual","description":"Registers an account manually in the pool using a refresh token or raw JSON payload.","operationId":"status_accounts_add_manual_v1_status_accounts_add_manual_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualAddAccountRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/ledger":{"get":{"summary":"Get Status Ledger","operationId":"get_status_ledger_v1_status_ledger_get","parameters":[{"name":"account_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Email"}},{"name":"project_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"}},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/ledger/export":{"get":{"summary":"Export Status Ledger","operationId":"export_status_ledger_v1_status_ledger_export_get","parameters":[{"name":"account_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Email"}},{"name":"project_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"}},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Format"}},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/analytics/expenses":{"get":{"summary":"Get Status Analytics Expenses","operationId":"get_status_analytics_expenses_v1_status_analytics_expenses_get","parameters":[{"name":"timeframe","in":"query","required":false,"schema":{"type":"string","default":"30d","title":"Timeframe"}},{"name":"project_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"}},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"}},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/analytics/drilldown":{"get":{"summary":"Get Status Analytics Drilldown","operationId":"get_status_analytics_drilldown_v1_status_analytics_drilldown_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","default":"project","title":"Type"}},{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Name"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},{"name":"target_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/analytics/api-keys":{"get":{"summary":"Get Status Analytics Api Keys","operationId":"get_status_analytics_api_keys_v1_status_analytics_api_keys_get","parameters":[{"name":"start_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Ts"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/analytics/diurnal-efficiency":{"get":{"summary":"Get Diurnal Efficiency Analytics","description":"Retrieve 24-hour diurnal and 7x24 weekly efficiency analytics and relative quota burn metrics.\n\nCalculates empirical token yields and relative quota burn percentage (Q_burn) across hours of day\nand days of week.\n\nResponse schema elements:\n- hourly_curve (List[Dict]): 24 hourly records with:\n    - relative_quota_burn_pct (Optional[float]): e.g. 75.0 (frugal/efficient) or 130.0 (congested), None if unobserved.\n    - quota_burn_delta_pct (Optional[float]): delta % from 100% baseline (e.g. -25.0), None if unobserved.\n    - tag (str): 5-tier classification ('Peak Efficiency 🚀', 'Frugal 🟢', 'Nominal 🔵', 'Elevated 🟡', 'Congested 🔴', or 'Unobserved ⚪').\n    - tag_style (Dict[str, str]): CSS styling parameters for UI rendering.\n    - hour_utc (int), hour_local (int), effective_capacity (int), accuracy_score_pct (float), is_observed (bool).\n    - is_peak_efficiency (bool), is_peak_recovery (bool).\n- weekly_summary (Dict):\n    - weekday_avg_quota_burn_pct (Optional[float]): Mon-Fri mean relative quota burn %.\n    - weekend_avg_quota_burn_pct (Optional[float]): Sat-Sun mean relative quota burn %.\n    - peak_day_name (Optional[str]), congested_day_name (Optional[str]).\n    - weekday_avg_efficiency (Optional[float]), weekend_avg_efficiency (Optional[float]), anova_two_way (Dict).\n- fleet_summary (Dict):\n    - fleet_mean_quota_burn_pct (Optional[float]): Fleet baseline (100.0% when observed, None if unobserved).\n    - peak_efficiency_hours_utc (List[int]), peak_recovery_hours_utc (List[int], backwards-compatible alias), recommended_batch_window (Dict).\n- day_of_week_curve (List[Dict]): 7-day metrics with relative_quota_burn_pct and quota_burn_delta_pct.\n- weekly_matrix (List[Dict]): 168 cells (7x24) with relative_quota_burn_pct and quota_burn_delta_pct.\n- account_breakdown (Dict[str, Dict]): per-account breakdown with relative_quota_burn_range.","operationId":"get_diurnal_efficiency_analytics_v1_status_analytics_diurnal_efficiency_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"bucket_type","in":"query","required":false,"schema":{"type":"string","default":"5h","title":"Bucket Type"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":14,"title":"Window Days"}},{"name":"tz_offset","in":"query","required":false,"schema":{"type":"integer","maximum":23,"minimum":-23,"default":0,"title":"Tz Offset"}},{"name":"day_of_week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":6,"minimum":0},{"type":"null"}],"description":"Optional day of week filter: 0=Monday ... 6=Sunday","title":"Day Of Week"},"description":"Optional day of week filter: 0=Monday ... 6=Sunday"},{"name":"include_weekly_matrix","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include 7x24 weekly matrix (168 cells)","default":true,"title":"Include Weekly Matrix"},"description":"Whether to include 7x24 weekly matrix (168 cells)"},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/analytics/diurnal-efficiency":{"get":{"summary":"Get Diurnal Efficiency Analytics","description":"Retrieve 24-hour diurnal and 7x24 weekly efficiency analytics and relative quota burn metrics.\n\nCalculates empirical token yields and relative quota burn percentage (Q_burn) across hours of day\nand days of week.\n\nResponse schema elements:\n- hourly_curve (List[Dict]): 24 hourly records with:\n    - relative_quota_burn_pct (Optional[float]): e.g. 75.0 (frugal/efficient) or 130.0 (congested), None if unobserved.\n    - quota_burn_delta_pct (Optional[float]): delta % from 100% baseline (e.g. -25.0), None if unobserved.\n    - tag (str): 5-tier classification ('Peak Efficiency 🚀', 'Frugal 🟢', 'Nominal 🔵', 'Elevated 🟡', 'Congested 🔴', or 'Unobserved ⚪').\n    - tag_style (Dict[str, str]): CSS styling parameters for UI rendering.\n    - hour_utc (int), hour_local (int), effective_capacity (int), accuracy_score_pct (float), is_observed (bool).\n    - is_peak_efficiency (bool), is_peak_recovery (bool).\n- weekly_summary (Dict):\n    - weekday_avg_quota_burn_pct (Optional[float]): Mon-Fri mean relative quota burn %.\n    - weekend_avg_quota_burn_pct (Optional[float]): Sat-Sun mean relative quota burn %.\n    - peak_day_name (Optional[str]), congested_day_name (Optional[str]).\n    - weekday_avg_efficiency (Optional[float]), weekend_avg_efficiency (Optional[float]), anova_two_way (Dict).\n- fleet_summary (Dict):\n    - fleet_mean_quota_burn_pct (Optional[float]): Fleet baseline (100.0% when observed, None if unobserved).\n    - peak_efficiency_hours_utc (List[int]), peak_recovery_hours_utc (List[int], backwards-compatible alias), recommended_batch_window (Dict).\n- day_of_week_curve (List[Dict]): 7-day metrics with relative_quota_burn_pct and quota_burn_delta_pct.\n- weekly_matrix (List[Dict]): 168 cells (7x24) with relative_quota_burn_pct and quota_burn_delta_pct.\n- account_breakdown (Dict[str, Dict]): per-account breakdown with relative_quota_burn_range.","operationId":"get_diurnal_efficiency_analytics_v1_analytics_diurnal_efficiency_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"bucket_type","in":"query","required":false,"schema":{"type":"string","default":"5h","title":"Bucket Type"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":14,"title":"Window Days"}},{"name":"tz_offset","in":"query","required":false,"schema":{"type":"integer","maximum":23,"minimum":-23,"default":0,"title":"Tz Offset"}},{"name":"day_of_week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":6,"minimum":0},{"type":"null"}],"description":"Optional day of week filter: 0=Monday ... 6=Sunday","title":"Day Of Week"},"description":"Optional day of week filter: 0=Monday ... 6=Sunday"},{"name":"include_weekly_matrix","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include 7x24 weekly matrix (168 cells)","default":true,"title":"Include Weekly Matrix"},"description":"Whether to include 7x24 weekly matrix (168 cells)"},{"name":"password","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/record_usage":{"post":{"summary":"Record Usage Endpoint","operationId":"record_usage_endpoint_v1_status_record_usage_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/index.html":{"get":{"summary":"Get Status Html","operationId":"get_status_html_v1_status_index_html_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status/":{"get":{"summary":"Get Status Html","operationId":"get_status_html_v1_status__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}},"/v1/status":{"get":{"summary":"Get Status Html","operationId":"get_status_html_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}],"tags":["LLM API Gateway"]}}},"components":{"schemas":{"AccountActionResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the action succeeded"},"message":{"type":"string","title":"Message","description":"Informational message or error description"},"account":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Account","description":"Account details if available"}},"type":"object","required":["success","message"],"title":"AccountActionResponse","description":"Standard response model for account modification actions."},"ChatCompletionMessage":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the messages author (e.g., system, user, assistant, tool)"},"content":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"null"}],"title":"Content","description":"The contents of the message","default":""},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"The reasoning content generated by the model"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional name for the participant"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"The tool calls generated by the model"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"Tool call that this message is responding to"}},"type":"object","required":["role"],"title":"ChatCompletionMessage"},"ChatCompletionRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ChatCompletionMessage"},"type":"array","title":"Messages","description":"A list of messages comprising the conversation so far"},"model":{"type":"string","title":"Model","description":"ID of the model to use"},"stream":{"type":"boolean","title":"Stream","description":"If set, partial message deltas will be sent","default":false},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"What sampling temperature to use","default":1.0},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens to generate"},"max_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Completion Tokens","description":"An upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Constrains effort on reasoning for reasoning models (e.g., 'low', 'medium', 'high')"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"An alternative to sampling with temperature","default":1.0},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"How many chat completion choices to generate","default":1},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"Up to 4 sequences where the API will stop generating further tokens"},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","description":"Positive values penalize new tokens based on whether they appear in the text so far","default":0.0},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","description":"Positive values penalize new tokens based on their existing frequency in the text so far","default":0.0},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias","description":"Modify the likelihood of specified tokens appearing in the completion"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"A unique identifier representing your end-user"},"response_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Format","description":"An object specifying the format that the model must output"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"A list of tools the model may call"},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice","description":"Controls which (if any) tool is called by the model"}},"type":"object","required":["messages","model"],"title":"ChatCompletionRequest"},"EmbeddingData":{"properties":{"object":{"type":"string","title":"Object","description":"The object type, which is always embedding","default":"embedding"},"embedding":{"items":{"type":"number"},"type":"array","title":"Embedding","description":"The embedding vector"},"index":{"type":"integer","title":"Index","description":"The index of the embedding in the list of embeddings"}},"type":"object","required":["embedding","index"],"title":"EmbeddingData"},"EmbeddingRequest":{"properties":{"input":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Input","description":"Input text to embed, encoded as a string or array of strings"},"model":{"type":"string","title":"Model","description":"ID of the model to use"}},"type":"object","required":["input","model"],"title":"EmbeddingRequest"},"EmbeddingResponse":{"properties":{"object":{"type":"string","title":"Object","description":"The object type, which is always list","default":"list"},"data":{"items":{"$ref":"#/components/schemas/EmbeddingData"},"type":"array","title":"Data","description":"List of embedding objects"},"model":{"type":"string","title":"Model","description":"The model used for the embedding"},"usage":{"$ref":"#/components/schemas/EmbeddingUsage","description":"Usage statistics for the request"}},"type":"object","required":["data","model","usage"],"title":"EmbeddingResponse"},"EmbeddingUsage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Tokens used in the prompt","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total tokens used","default":0}},"type":"object","title":"EmbeddingUsage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageGenerationRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"A text description of the desired image(s)"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"The model to use for image generation","default":"gemini-3.1-flash-image"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url","description":"Optional URL or base64 of reference image to modify (Image-to-Image)"},"init_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Init Image","description":"Optional base64 or URL of initial image to modify"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Optional base64 or URL of input image"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"The number of images to generate","default":1},"quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality","description":"The quality of the image that will be generated","default":"standard"},"response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Format","description":"The format in which the generated images are returned","default":"url"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size","description":"The size of the generated images","default":"1024x1024"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style","description":"The style of the generated images","default":"vivid"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"A unique identifier representing your end-user"}},"type":"object","required":["prompt"],"title":"ImageGenerationRequest"},"ManualAddAccountRequest":{"properties":{"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token","description":"Google OAuth refresh token"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Account email address"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional display name for the account"},"raw_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Json","description":"Raw JSON string containing account credentials"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Optional admin password for protected operations"}},"type":"object","title":"ManualAddAccountRequest","description":"Request payload to manually register an account via token or raw JSON."},"ModelListResponse":{"properties":{"object":{"type":"string","title":"Object","description":"The object type, which is always list","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ModelObject"},"type":"array","title":"Data","description":"List of available models"}},"type":"object","required":["data"],"title":"ModelListResponse"},"ModelObject":{"properties":{"id":{"type":"string","title":"Id","description":"The model identifier, which can be referenced in the API endpoints"},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created","description":"The Unix timestamp (in seconds) when the model was created"},"object":{"type":"string","title":"Object","description":"The object type, which is always 'model'","default":"model"},"owned_by":{"type":"string","title":"Owned By","description":"The organization that owns the model","default":"system"}},"type":"object","required":["id"],"title":"ModelObject"},"OAuthExchangeRequest":{"properties":{"code_or_url":{"type":"string","title":"Code Or Url","description":"Authorization code or full redirect callback URL"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"HMAC-signed state token for PKCE verification"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Optional admin password for protected operations"}},"type":"object","required":["code_or_url"],"title":"OAuthExchangeRequest","description":"Request payload to exchange authorization code or redirect URL for credentials."},"OAuthStartRequest":{"properties":{"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri","description":"OAuth redirect URI to receive authorization code","default":"http://localhost:51121/oauth-callback"}},"type":"object","title":"OAuthStartRequest","description":"Request payload to initiate a Google OAuth PKCE flow."},"OAuthStartResponse":{"properties":{"auth_url":{"type":"string","title":"Auth Url","description":"Google OAuth authorization URL"},"state":{"type":"string","title":"State","description":"HMAC-signed PKCE state token"},"redirect_uri":{"type":"string","title":"Redirect Uri","description":"Callback redirect URI configured for this flow"}},"type":"object","required":["auth_url","state","redirect_uri"],"title":"OAuthStartResponse","description":"Response payload containing generated authorization URL and signed state."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key (sec-...)","description":"Enter your API Token (e.g. sec-XaUxdSdG...)"}}},"tags":[{"name":"LLM API Gateway","description":"OpenAI-compatible LLM Gateway endpoints (Gemini & Claude)"}]}