{"openapi":"3.1.0","info":{"title":"LLM API Gateway","description":"OpenAI-compatible REST API Gateway providing high-availability access to Google Gemini 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","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/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/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":{"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"},"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"},"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"},"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)"}]}