{
  "openapi": "3.1.1",
  "info": {
    "title": "Eldrim API",
    "version": "2026-10-04",
    "description": "Open models on account-approved European infrastructure. Restricted evaluation; this contract describes Eldrim's supported subset, not the full OpenAI or Anthropic API. No persistent conversation/file store. Endpoint availability depends on model, account, residency and provider capability. Read each operation before importing this document into Swagger-compatible tools.",
    "contact": {
      "name": "Eldrim support",
      "email": "support@eldrim.ai",
      "url": "https://eldrim.ai/developers.html"
    }
  },
  "servers": [
    {
      "url": "https://api.eldrim.net",
      "description": "Restricted evaluation API"
    }
  ],
  "tags": [
    {
      "name": "Models"
    },
    {
      "name": "Inference"
    },
    {
      "name": "Account"
    },
    {
      "name": "Service"
    },
    {
      "name": "Unsupported"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/healthz": {
      "get": {
        "operationId": "health",
        "summary": "Gateway health",
        "description": "Checks the gateway process. Does not check provider availability or model readiness.",
        "tags": [
          "Service"
        ],
        "responses": {
          "200": {
            "description": "Gateway is running",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": []
      }
    },
    "/v1/models": {
      "get": {
        "operationId": "listModels",
        "summary": "List models available to your account",
        "description": "Account and residency filtered. A valid key with no enabled models receives data: [] with an eldrim.code of no_models_available. Contact support to review access. Prices are integer ore per million tokens.",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Models"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/models/{model}": {
      "get": {
        "operationId": "retrieveModel",
        "summary": "Retrieve a model",
        "description": "Same visibility rules as the list. Accepts an Eldrim ID or configured alias; returns the canonical ID. Encode slashes in aliases as %2F. Hidden and unknown models both return 404.",
        "tags": [
          "Models"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "model",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/chat/completions": {
      "post": {
        "operationId": "createChatCompletion",
        "summary": "Create a chat completion",
        "description": "JSON or SSE. Streaming uses choices[].delta and terminates with [DONE]. Set stream_options.include_usage=true for usage. Keep history in the client. No stored completion API. Tools and structured output depend on model/provider. A broken stream is not continued on another provider.",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "example": "Provider protocol SSE events; see operation description."
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              },
              "example": {
                "model": "gemma3-12b",
                "messages": [
                  {
                    "role": "user",
                    "content": "Explain a queue."
                  }
                ],
                "max_tokens": 128
              }
            }
          }
        }
      }
    },
    "/v1/completions": {
      "post": {
        "operationId": "createCompletion",
        "summary": "Complete a text prompt",
        "description": "Native text completion on enabled routes, not a chat-to-text approximation. JSON and SSE use choices[].text. Streaming ends with [DONE]; optional usage chunk. One string prompt and one completion per request. Other generation options depend on provider/model.",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompletionResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "example": "data: {\"id\":\"example\",\"model\":\"your-model\",\"choices\":[{\"index\":0,\"text\":\"Hello\",\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletionRequest"
              },
              "example": {
                "model": "llama3.2-3b",
                "prompt": "The capital of Sweden is",
                "max_tokens": 16
              }
            }
          }
        }
      }
    },
    "/v1/embeddings": {
      "post": {
        "operationId": "createEmbeddings",
        "summary": "Create text embeddings",
        "description": "One string or up to 128 strings. Choose a model advertising this endpoint. The installed nomic-embed-text evaluation model produces 768 dimensions by default. Use search_document: or search_query: prefixes for retrieval. Only input tokens are charged. No vector storage is provided.",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingRequest"
              },
              "example": {
                "model": "nomic-embed-text",
                "input": [
                  "search_document: Heat can warm buildings.",
                  "search_query: district heating"
                ],
                "encoding_format": "float"
              }
            }
          }
        }
      }
    },
    "/v1/responses": {
      "post": {
        "operationId": "createResponse",
        "summary": "Create a stateless response",
        "description": "Native Responses protocol on enabled routes. SSE uses named response.* events ending in response.completed; response.failed/incomplete are failures. No stored response retrieval, cancellation API, compaction, previous_response_id, hosted tools or background work. Disconnect to cancel active streaming work.",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "example": "Provider protocol SSE events; see operation description."
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequest"
              },
              "example": {
                "model": "qwen3.6-35b",
                "input": "Explain a queue.",
                "store": false,
                "max_output_tokens": 128
              }
            }
          }
        }
      }
    },
    "/v1/messages": {
      "post": {
        "operationId": "createMessage",
        "summary": "Create a Messages response",
        "description": "Anthropic-style Messages on enabled routes. SSE includes message_start, content_block events, message_delta and message_stop. Your client executes tools. A supplied Authorization header takes precedence over x-api-key, even if the bearer key is invalid.",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "example": "Provider protocol SSE events; see operation description."
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesRequest"
              },
              "example": {
                "model": "qwen3.6-35b",
                "max_tokens": 128,
                "messages": [
                  {
                    "role": "user",
                    "content": "Explain a queue."
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/v1/messages/count_tokens": {
      "post": {
        "operationId": "countMessageTokens",
        "summary": "Count Messages input tokens (capacity pending)",
        "description": "Implemented capability gate, but no production-configured provider currently supports it. A visible model returns 400 invalid_request_error explaining the unsupported protocol. It is not an approximate token estimator. Never billed as inference.",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountTokensResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountTokensRequest"
              }
            }
          }
        },
        "x-eldrim-status": "no-enabled-route"
      }
    },
    "/v1/systemone": {
      "post": {
        "operationId": "createDecision",
        "summary": "Run a decision model",
        "description": "Separate decision-model protocol on approved routes. Models have endpoint=/v1/systemone. Classifies/scores input; suitability for regulated use requires a separate review.",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemOneResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemOneRequest"
              },
              "example": {
                "model": "nimble-9b",
                "state": "A customer asks for opening hours.",
                "questions": {
                  "intent": {
                    "type": "choice",
                    "choices": [
                      "hours",
                      "other"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/eldrim/account": {
      "get": {
        "operationId": "getAccount",
        "summary": "Read balance and usage",
        "description": "Account metadata and 30-day usage. Financial values use integer micro-SEK or exact decimal strings. Evaluation credit/usage is not proof of earned revenue.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/eldrim/requests": {
      "get": {
        "operationId": "listRequests",
        "summary": "List recent request metadata",
        "description": "Newest first, scoped to the authenticated account: requests made with any of the account's API keys, and from the console's test box. key_id narrows the list to one key and never reaches another account's records. Contains execution metadata; pre-routing refusals are not recorded. No prompt or answer bodies.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RequestRecord"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Invalid or out-of-range values fall back to 20."
          },
          {
            "name": "key_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^key_[0-9a-f]{12}$"
            },
            "description": "Only requests made with this API key of the authenticated account, by the key ID shown in the console and in request records. An ID of another account's key returns an empty list. A value that is not a key ID returns 400."
          }
        ]
      }
    },
    "/v1/eldrim/requests/{id}": {
      "get": {
        "operationId": "retrieveRequest",
        "summary": "Read one request record",
        "description": "Other accounts' IDs and unknown IDs both return 404. This retrieves Eldrim execution metadata, not an OpenAI stored completion.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestRecord"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/eldrim/topup": {
      "post": {
        "operationId": "createTopup",
        "summary": "Create a test-mode checkout",
        "description": "Currently Stripe test mode for restricted evaluation. This operation does not enable paid production; commercial release gates remain open.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TopupRequest"
              },
              "example": {
                "amount_sek": 100
              }
            }
          }
        }
      }
    },
    "/v1/eldrim/signup": {
      "post": {
        "operationId": "requestAccess",
        "summary": "Submit an access request",
        "description": "Public form intake for operator review. Does not automatically create an account or API key. Redirects to the site confirmation/error page.",
        "tags": [
          "Service"
        ],
        "responses": {
          "303": {
            "description": "Form outcome redirect",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "company": {
                    "type": "string"
                  },
                  "residency": {
                    "type": "string"
                  },
                  "volume": {
                    "type": "string"
                  },
                  "use_case": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "consent": {
                    "const": "yes"
                  },
                  "website": {
                    "type": "string",
                    "description": "Leave empty (honeypot)."
                  }
                },
                "required": [
                  "name",
                  "email",
                  "consent"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/stripe/webhook": {
      "post": {
        "operationId": "stripeWebhook",
        "summary": "Receive Stripe payment events",
        "description": "Integration endpoint for signed Stripe events, not a customer API. Raw body signature checked; webhook credits are idempotent.",
        "tags": [
          "Service"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "received": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "received"
                  ]
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "Stripe-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenAPI",
        "summary": "Download this OpenAPI contract",
        "description": "Public JSON contract, also published at https://eldrim.ai/openapi.json.",
        "tags": [
          "Service"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Policy": {
                "description": "Account residency policy on authenticated inference.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Provider": {
                "description": "Configured selected provider; present after execution was attempted.",
                "schema": {
                  "type": "string"
                }
              },
              "X-Eldrim-Residency": {
                "description": "Configured execution residency, not independent attestation.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamFailure"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "security": []
      }
    },
    "/docs": {
      "get": {
        "operationId": "openReference",
        "summary": "Open the API reference",
        "description": "Redirects to the static public reference on eldrim.ai.",
        "tags": [
          "Service"
        ],
        "responses": {
          "302": {
            "description": "Reference redirect",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/files": {
      "get": {
        "operationId": "getUnsupportedFiles",
        "summary": "File storage and retrieval (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedFiles",
        "summary": "File storage and retrieval (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/uploads": {
      "get": {
        "operationId": "getUnsupportedUploads",
        "summary": "Multipart file uploads (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedUploads",
        "summary": "Multipart file uploads (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/batches": {
      "get": {
        "operationId": "getUnsupportedBatches",
        "summary": "Hosted batch jobs (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedBatches",
        "summary": "Hosted batch jobs (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/fine_tuning": {
      "get": {
        "operationId": "getUnsupportedFineTuning",
        "summary": "Training and fine tuning (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedFineTuning",
        "summary": "Training and fine tuning (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/assistants": {
      "get": {
        "operationId": "getUnsupportedAssistants",
        "summary": "Hosted assistants (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedAssistants",
        "summary": "Hosted assistants (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/threads": {
      "get": {
        "operationId": "getUnsupportedThreads",
        "summary": "Stored threads and runs (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedThreads",
        "summary": "Stored threads and runs (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/vector_stores": {
      "get": {
        "operationId": "getUnsupportedVectorStores",
        "summary": "Vector storage and search (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedVectorStores",
        "summary": "Vector storage and search (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/conversations": {
      "get": {
        "operationId": "getUnsupportedConversations",
        "summary": "Stored conversations (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedConversations",
        "summary": "Stored conversations (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/images": {
      "get": {
        "operationId": "getUnsupportedImages",
        "summary": "Image generation and editing (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedImages",
        "summary": "Image generation and editing (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/audio": {
      "get": {
        "operationId": "getUnsupportedAudio",
        "summary": "Speech generation, transcription and translation (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedAudio",
        "summary": "Speech generation, transcription and translation (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/videos": {
      "get": {
        "operationId": "getUnsupportedVideos",
        "summary": "Video generation (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedVideos",
        "summary": "Video generation (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/moderations": {
      "get": {
        "operationId": "getUnsupportedModerations",
        "summary": "Moderation classification (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedModerations",
        "summary": "Moderation classification (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/realtime": {
      "get": {
        "operationId": "getUnsupportedRealtime",
        "summary": "Realtime sessions (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedRealtime",
        "summary": "Realtime sessions (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/containers": {
      "get": {
        "operationId": "getUnsupportedContainers",
        "summary": "Hosted execution containers (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedContainers",
        "summary": "Hosted execution containers (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/evals": {
      "get": {
        "operationId": "getUnsupportedEvals",
        "summary": "Hosted evaluations (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedEvals",
        "summary": "Hosted evaluations (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/organization": {
      "get": {
        "operationId": "getUnsupportedOrganization",
        "summary": "OpenAI organisation administration and usage (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedOrganization",
        "summary": "OpenAI organisation administration and usage (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "getUnsupportedProjects",
        "summary": "OpenAI project administration (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      },
      "post": {
        "operationId": "postUnsupportedProjects",
        "summary": "OpenAI project administration (unsupported)",
        "description": "This family and its child paths are refused locally. No work, storage or billing is started.",
        "tags": [
          "Unsupported"
        ],
        "security": [],
        "x-eldrim-status": "unsupported",
        "responses": {
          "501": {
            "$ref": "#/components/responses/Unsupported"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Eldrim API key. Never an OpenAI or Anthropic key."
      },
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Messages endpoints only; Authorization takes precedence."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "param": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "type",
              "message"
            ]
          },
          "type": {
            "type": "string",
            "description": "Messages errors include type=error."
          },
          "documentation_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "error"
        ]
      },
      "Usage": {
        "type": "object",
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "completion_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "total_tokens": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "prompt_tokens",
          "total_tokens"
        ]
      },
      "Pricing": {
        "type": "object",
        "properties": {
          "currency": {
            "const": "SEK"
          },
          "input_ore_per_million_tokens": {
            "type": "integer",
            "minimum": 0
          },
          "output_ore_per_million_tokens": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "currency",
          "input_ore_per_million_tokens",
          "output_ore_per_million_tokens"
        ]
      },
      "Model": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "model"
          },
          "created": {
            "type": "integer",
            "description": "Catalogue creation timestamp when known; 0 means unknown. Not a claim about training date."
          },
          "owned_by": {
            "const": "eldrim"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "endpoint": {
            "type": "string",
            "description": "Primary endpoint."
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Protocols with at least one route allowed by this account and residency. Does not promise current capacity or every optional provider feature."
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          },
          "context_tokens": {
            "type": "integer",
            "minimum": 1,
            "description": "Configured prompt window, omitted when unknown."
          },
          "tokenizer": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "owned_by",
          "endpoint",
          "endpoints",
          "aliases",
          "pricing"
        ]
      },
      "Models": {
        "type": "object",
        "properties": {
          "object": {
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Model"
            }
          },
          "eldrim": {
            "type": "object",
            "properties": {
              "code": {
                "const": "no_models_available"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "object",
          "data"
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "tool_call_id": {
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "additionalProperties": true
      },
      "ChatRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "tool_choice": {},
          "response_format": {
            "type": "object"
          },
          "store": {
            "const": false,
            "default": false
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": true
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "stop": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "seed": {
            "type": "integer"
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "description": "Output limit subject to the selected model and provider."
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": true,
        "description": "Stateless chat. Optional sampling, tools, images and structured output depend on the selected model/provider. Tool execution belongs to the client. store=true is refused."
      },
      "ChatResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "chat.completion"
          },
          "created": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "message": {
                  "$ref": "#/components/schemas/Message"
                },
                "finish_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "index",
                "message",
                "finish_reason"
              ]
            }
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "id",
          "model",
          "choices"
        ]
      },
      "CompletionRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "prompt": {
            "type": "string",
            "description": "One text prompt; prompt arrays and token IDs are not supported."
          },
          "n": {
            "const": 1,
            "default": 1
          },
          "best_of": {
            "const": 1,
            "default": 1
          },
          "echo": {
            "type": "boolean",
            "default": false
          },
          "suffix": {
            "type": "string",
            "description": "Provider/model dependent."
          },
          "logprobs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5
          },
          "store": {
            "const": false
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "stream_options": {
            "type": "object",
            "properties": {
              "include_usage": {
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": true
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "stop": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "seed": {
            "type": "integer"
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "description": "Output limit subject to the selected model and provider."
          }
        },
        "required": [
          "model",
          "prompt"
        ],
        "additionalProperties": true
      },
      "CompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "text_completion"
          },
          "created": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "text": {
                  "type": "string"
                },
                "logprobs": {
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "finish_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "index",
                "text",
                "finish_reason"
              ]
            }
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "id",
          "object",
          "model",
          "choices",
          "usage"
        ]
      },
      "EmbeddingRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "input": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "minItems": 1,
                "maxItems": 128
              }
            ]
          },
          "encoding_format": {
            "type": "string",
            "enum": [
              "float",
              "base64"
            ],
            "default": "float"
          },
          "dimensions": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional reduced dimension count; provider/model dependent."
          },
          "user": {
            "type": "string"
          },
          "stream": {
            "const": false
          }
        },
        "required": [
          "model",
          "input"
        ],
        "description": "Text only. Token arrays are refused. Use a model advertising /v1/embeddings, such as nomic-embed-text for authorised evaluation accounts.",
        "additionalProperties": true
      },
      "EmbeddingResponse": {
        "type": "object",
        "properties": {
          "object": {
            "const": "list"
          },
          "model": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "const": "embedding"
                },
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "embedding": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    },
                    {
                      "type": "string",
                      "description": "Base64-encoded float32 vector."
                    }
                  ]
                }
              },
              "required": [
                "object",
                "index",
                "embedding"
              ]
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "minimum": 0
              },
              "total_tokens": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "prompt_tokens",
              "total_tokens"
            ]
          }
        },
        "required": [
          "object",
          "model",
          "data",
          "usage"
        ]
      },
      "ResponsesRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "input": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          },
          "instructions": {
            "type": "string"
          },
          "max_output_tokens": {
            "type": "integer",
            "minimum": 1
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "store": {
            "const": false,
            "default": false
          },
          "background": {
            "const": false
          },
          "previous_response_id": {
            "type": "null"
          },
          "conversation": {
            "type": "null"
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "const": "function"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "parameters": {
                  "type": "object"
                }
              },
              "required": [
                "type",
                "name"
              ]
            }
          }
        },
        "required": [
          "model",
          "input"
        ],
        "additionalProperties": true,
        "description": "Native provider protocol. Only inline, stateless requests and client-executed function tools. Remote files/URLs, hosted tools and server-side conversation state are refused. Supported fields depend on provider."
      },
      "ResponsesResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "const": "response"
          },
          "model": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "output": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              },
              "total_tokens": {
                "type": "integer"
              }
            }
          }
        },
        "required": [
          "id",
          "output"
        ],
        "additionalProperties": true
      },
      "MessagesRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "input_schema": {
                  "type": "object"
                },
                "type": {
                  "enum": [
                    "custom",
                    null
                  ]
                }
              },
              "required": [
                "name",
                "input_schema"
              ]
            }
          }
        },
        "required": [
          "model",
          "messages",
          "max_tokens"
        ],
        "additionalProperties": true,
        "description": "Native Anthropic-style Messages with inline content and client-executed tools on enabled routes. No hosted tools, URL fetches or stored conversation."
      },
      "MessagesResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "const": "message"
          },
          "role": {
            "const": "assistant"
          },
          "model": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stop_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "content"
        ],
        "additionalProperties": true
      },
      "CountTokensRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stream": {
            "const": false
          }
        },
        "required": [
          "model",
          "messages"
        ],
        "additionalProperties": true
      },
      "SystemOneRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "questions": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "description": "Named questions. Each specifies type choice, noul or score and any required options."
          }
        },
        "required": [
          "model",
          "state",
          "questions"
        ],
        "description": "Decision-model protocol; see the developer guide for question formats. Not a general moderation or regulated decision service.",
        "additionalProperties": true
      },
      "SystemOneResponse": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              }
            }
          }
        },
        "required": [
          "model"
        ],
        "additionalProperties": true
      },
      "Account": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "string"
          },
          "residency": {
            "enum": [
              "se",
              "eu",
              "any"
            ]
          },
          "balance_micro_sek": {
            "type": "integer",
            "description": "Signed integer micro-SEK; 1 SEK = 1000000 micro-SEK."
          },
          "balance_sek": {
            "type": "string"
          },
          "usage_30d": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Per-model totals with integer token counts and price_micro_sek; price_sek is a decimal string."
            }
          }
        },
        "required": [
          "customer",
          "residency",
          "balance_micro_sek",
          "balance_sek",
          "usage_30d"
        ]
      },
      "RequestRecord": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "key_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^key_[0-9a-f]{12}$",
            "description": "Public ID of the account's API key that made the request, as shown in the console, for example key_3f9a1b2c4d5e. Null for requests from the console's test box and for requests recorded before key IDs existed."
          },
          "model": {
            "type": "string"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "residency": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "integer"
          },
          "result": {
            "type": "string"
          },
          "prompt_tokens": {
            "type": "integer"
          },
          "completion_tokens": {
            "type": "integer"
          },
          "price_micro_sek": {
            "type": "integer"
          },
          "price_sek": {
            "type": "string"
          },
          "routing": {
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "request_id",
          "ts",
          "key_id",
          "model",
          "status",
          "result",
          "price_micro_sek"
        ],
        "description": "Account-scoped execution metadata, not stored prompt/response content or independent location attestation. Any of the account's keys can read records made with its other keys."
      },
      "TopupRequest": {
        "type": "object",
        "properties": {
          "amount_sek": {
            "type": "integer",
            "minimum": 100,
            "maximum": 50000,
            "description": "Whole SEK. The configured bounds are enforced; trial billing currently uses Stripe test mode."
          }
        },
        "required": [
          "amount_sek"
        ]
      },
      "CountTokensResponse": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "input_tokens"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid input or no approved route supports the requested protocol.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, unknown, revoked or expired Eldrim key. An expired key returns error code api_key_expired.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "InsufficientBalance": {
        "description": "Positive balance is required before inference, including token-count requests.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Suspended account or residency policy cannot be satisfied.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown endpoint, model unavailable to the account, or request record not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "WrongMethod": {
        "description": "Method not allowed. Read the Allow response header.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          },
          "Allow": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "TooLarge": {
        "description": "Inference request exceeds the 8 MiB limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Capacity or rate limit; inspect Retry-After if present.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          },
          "Retry-After": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Unsupported": {
        "description": "Recognised API family/operation is not implemented. No request was forwarded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "UpstreamFailure": {
        "description": "Provider transport failure or invalid response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Unavailable": {
        "description": "No eligible route or providers recovering.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          },
          "Retry-After": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Timeout": {
        "description": "Provider timeout.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "X-Request-Id": {
            "description": "Gateway request correlation ID. Keep this when contacting support.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "x-eldrim-unsupported-operations": [
    "GET/POST/DELETE /v1/responses/{id} and child operations, including input_tokens and compact",
    "GET/POST/DELETE /v1/chat/completions/{id} and stored message retrieval",
    "DELETE /v1/models/{model} returns 405; model lifecycle belongs to the operator"
  ],
  "externalDocs": {
    "description": "Developer guide and client examples",
    "url": "https://eldrim.ai/developers.html"
  }
}
