{
    "swagger": "2.0",
    "info": {
        "description": "A simple embedding service that wraps AWS Bedrock and provides OpenAI-compatible API endpoints.",
        "title": "Inference Service API",
        "contact": {},
        "version": "1.0"
    },
    "host": "localhost:8080",
    "basePath": "/",
    "paths": {
        "/api/v1/inference/embeddings/{tenantId}": {
            "post": {
                "description": "Generate embeddings for the given texts using the specified model",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "embeddings"
                ],
                "summary": "Create embeddings",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "tenantId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Embedding request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/service.EmbeddingRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/service.EmbeddingResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/service.ErrorResponse"
                        }
                    },
                    "429": {
                        "description": "Too Many Requests",
                        "schema": {
                            "$ref": "#/definitions/service.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/service.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/api/v1/inference/quota_usage": {
            "get": {
                "description": "Get quota usage information for all tenants",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "quota"
                ],
                "summary": "Get all quota usage",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/service.AllQuotaUsageResponse"
                        }
                    }
                }
            }
        },
        "/api/v1/inference/quota_usage/{tenantId}": {
            "get": {
                "description": "Get quota usage information for a specific tenant",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "quota"
                ],
                "summary": "Get tenant quota usage",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Tenant ID",
                        "name": "tenantId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/service.QuotaUsageResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/service.ErrorResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "service.AllQuotaUsageResponse": {
            "type": "object",
            "properties": {
                "tenants": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/service.QuotaUsageResponse"
                    }
                }
            }
        },
        "service.EmbeddingRequest": {
            "type": "object",
            "required": [
                "model",
                "texts"
            ],
            "properties": {
                "model": {
                    "type": "string"
                },
                "texts": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "service.EmbeddingResponse": {
            "type": "object",
            "properties": {
                "embeddings": {
                    "description": "The actual embeddings are returned as base64 strings for each text",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "usage": {
                    "$ref": "#/definitions/service.EmbeddingUsageInfo"
                }
            }
        },
        "service.EmbeddingUsageInfo": {
            "type": "object",
            "properties": {
                "prompt_tokens": {
                    "type": "integer"
                },
                "total_tokens": {
                    "type": "integer"
                }
            }
        },
        "service.ErrorResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string"
                }
            }
        },
        "service.QuotaUsageResponse": {
            "type": "object",
            "properties": {
                "current_usage": {
                    "type": "number"
                },
                "quota_limit": {
                    "type": "number"
                },
                "reset_date": {
                    "type": "string"
                },
                "tenant_id": {
                    "type": "string"
                }
            }
        }
    }
}