{
  "openapi": "3.1.1",
  "info": {
    "title": "Eldrim API",
    "version": "2026-10-07",
    "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. In inference request bodies, an optional field sent as null counts as absent and is not forwarded to the provider, as in the OpenAI API; a required field that is missing or null gets 400, except on campaign keys. BEAM campaign accounts use a separate token grant and a narrower text-chat-only contract; there a missing or null model gets 404 model_not_found, and other invalid bodies get the campaign's 400 invalid_request_error. Public claiming is disabled until readiness review; documentation does not enable capacity.",
    "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. Prices are the caller's own: a customer contract can set an account's price for a model, and pricing.source then says contract. Campaign accounts expose only eldrim-default when its configured route is eligible, at zero price with pricing.source campaign; an unavailable route can yield the documented empty list.",
        "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; marketplace accounts always receive it. Before the first chunk the stream may carry SSE comment lines (: keep-alive), which clients skip. 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. Campaign grants reserve a reviewed input ceiling plus requested output before one pinned Swedish route, with no fallback. Limits: two active requests and 30 admissions/60 seconds across all keys on a grant. Ambiguous provider outcomes retain reservations. Campaign price is zero; supplier cost is recorded separately.",
        "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. BEAM campaign accounts receive 400 campaign_unsupported_protocol before dispatch.",
        "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. BEAM campaign accounts receive 400 campaign_unsupported_protocol before dispatch.",
        "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. BEAM campaign accounts receive 400 campaign_unsupported_protocol before dispatch.",
        "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. BEAM campaign accounts receive 400 campaign_unsupported_protocol before dispatch.",
        "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. BEAM campaign accounts receive 400 campaign_unsupported_protocol before dispatch.",
        "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. BEAM campaign accounts receive 400 campaign_unsupported_protocol before dispatch.",
        "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/marketplace/models": {
      "get": {
        "operationId": "listMarketplaceModels",
        "summary": "Read the model document for a marketplace",
        "description": "For accounts in marketplace mode only (customer tag marketplace); other accounts get 403 marketplace_account_required. One OpenRouter provider model document (schema_version 2.4, see https://openrouter.ai/docs/assets/provider-monitor-schema-v2.openapi.json) per listed model the account may use. supported_parameters lists only the parameters the latest complete conformance run proved; prices are USD per token as exact decimal strings, the account's USD contract price when one is in force and the marketplace list price otherwise; is_ready stays false until an operator marks the model ready and the run passed its streaming and usage checks. format=edenai gives the ready models in Eden AI's catalogue fields. When the evidence cannot be read the answer is 503 marketplace_unavailable; the gateway serves no degraded document.",
        "tags": [
          "Models"
        ],
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "openrouter",
                "edenai"
              ],
              "default": "openrouter"
            },
            "description": "openrouter (the default) or edenai. Any other value returns 400."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketplaceModels"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Gateway request correlation ID. Keep this when contacting support.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/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. BEAM accounts receive 403 campaign_sponsored; paid continuation is separate.",
        "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/eldrim/trial": {
      "post": {
        "operationId": "requestTrial",
        "summary": "Request a self-serve trial invitation by email",
        "description": "Public entry point on eldrim.ai/hearth.html. Mints a mailed, single-use invite (20 SEK trial credit, no tags, 14 days) through the same path an operator uses to send one, rate-limited 3 per IP and per email per hour. The invitation link is only ever in the mail, never in this response. Redirects to the site confirmation or 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": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/eldrim/probes": {
      "post": {
        "operationId": "ingestProbeResults",
        "summary": "Store external probe results",
        "description": "Operator monitoring only, not for customers. The external probe posts the results of its checks here; they feed the public status at /v1/eldrim/status and are kept for 30 days. Authenticated with the probe token from the gateway configuration; Eldrim API keys are refused. Any invalid result refuses the whole batch. Until a usable token file is configured the path answers 404 like an unknown path.",
        "tags": [
          "Service"
        ],
        "security": [
          {
            "probeToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProbeBatch"
              },
              "example": {
                "probe": "homelab",
                "results": [
                  {
                    "check": "healthz",
                    "ts": "2026-10-07T20:00:01Z",
                    "ok": true,
                    "status": 200,
                    "latency_ms": 38
                  },
                  {
                    "check": "qwen3.6-35b",
                    "ts": "2026-10-07T20:00:01Z",
                    "ok": false,
                    "status": 503,
                    "latency_ms": 1204,
                    "error": "http_503"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored; duplicates were already stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProbeIngestResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Missing or wrong probe token (invalid_probe_token). Eldrim API keys are refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Probe ingest is not configured (endpoint_not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "413": {
            "$ref": "#/components/responses/TooLarge"
          },
          "503": {
            "description": "The results could not be stored (probe_store_unavailable). Send the same batch again later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/eldrim/status": {
      "get": {
        "operationId": "serviceStatus",
        "summary": "Read service status",
        "description": "Public, no key. Current state and 24-hour, 7-day and 30-day uptime per check, measured by an external probe outside the serving host; https://eldrim.ai/status renders it. Uptime is the share of successful probe results, rounded down; measured is the share of minutes with a result, because the probe cannot report while the API is unreachable. These are measurements; during early access the service has no service level agreement. Any origin may read it; responses may be cached for 30 seconds.",
        "tags": [
          "Service"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Current status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceStatus"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "public, max-age=30"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "const": "*"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/WrongMethod"
          },
          "503": {
            "description": "Status data is unavailable (status_unavailable).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/eldrim/coding-trial": {
      "post": {
        "operationId": "requestCodingTrial",
        "summary": "Request a self-serve coding-client trial invitation by email",
        "description": "Public entry point on eldrim.ai/developers.html's coding-client section. Mints a mailed, single-use invite (20 SEK trial credit, beta tag, 14 days) through the same path an operator uses to send one, rate-limited 3 per IP and per email per hour. The beta tag is what makes the coding-client examples' default model, qwen3.6-35b, visible to the account; that model's only routes are test hardware with no physical security. The invitation link is only ever in the mail, never in this response. Redirects to the site confirmation or 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": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        }
      }
    },
    "/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."
      },
      "probeToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Probe ingest token from the file named by ELDRIM_PROBE_TOKEN_FILE in the gateway configuration. Operator monitoring only; never an Eldrim API key."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "param": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "continue_url": {
                "type": "string",
                "format": "uri",
                "description": "Campaign continuation page, when applicable."
              }
            },
            "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": {
            "type": "string",
            "enum": [
              "SEK",
              "USD"
            ],
            "description": "SEK for list prices and SEK contracts, with the öre fields. USD for a USD contract price, with the micro-USD fields and fixing; such requests are invoiced in USD and debited in SEK at the fixing."
          },
          "input_ore_per_million_tokens": {
            "type": "integer",
            "minimum": 0,
            "description": "Present when currency is SEK."
          },
          "output_ore_per_million_tokens": {
            "type": "integer",
            "minimum": 0,
            "description": "Present when currency is SEK."
          },
          "input_micro_usd_per_million_tokens": {
            "type": "integer",
            "minimum": 0,
            "description": "Present when currency is USD. 199000 is USD 0.199 per million input tokens."
          },
          "output_micro_usd_per_million_tokens": {
            "type": "integer",
            "minimum": 0,
            "description": "Present when currency is USD."
          },
          "fixing": {
            "type": "object",
            "description": "Present when currency is USD: the exchange rate the contract version converts at, recorded in that version.",
            "properties": {
              "date": {
                "type": "string",
                "format": "date"
              },
              "micro_sek_per_usd": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000000,
                "description": "10042050 is 10.04205 SEK per USD."
              }
            },
            "required": [
              "date",
              "micro_sek_per_usd"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "list",
              "contract",
              "campaign"
            ],
            "description": "list: the model's list price. contract: a customer contract sets this account's price; contract_id and contract_version name it. campaign: a campaign grant covers the request in full, so the price is zero; campaign names the campaign family."
          },
          "contract_id": {
            "type": "string",
            "description": "Present when source is contract."
          },
          "contract_version": {
            "type": "integer",
            "minimum": 1,
            "description": "Present when source is contract."
          },
          "campaign": {
            "type": "string",
            "description": "Present when source is campaign."
          }
        },
        "required": [
          "currency",
          "source"
        ],
        "description": "The caller's effective price per million tokens: the model's list price in integer öre, the price of an approved customer contract in force for this account (source contract), in integer öre or, for a USD contract, in integer micro-USD with the fixing it converts at, or zero for an account whose campaign grant covers its requests (source campaign)."
      },
      "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",
              "null"
            ],
            "items": {
              "type": "object"
            }
          },
          "tool_choice": {},
          "response_format": {
            "type": [
              "object",
              "null"
            ]
          },
          "store": {
            "enum": [
              false,
              null
            ],
            "default": false
          },
          "stream": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false
          },
          "stream_options": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "include_usage": {
                "type": [
                  "boolean",
                  "null"
                ],
                "default": false
              }
            },
            "additionalProperties": true
          },
          "temperature": {
            "type": [
              "number",
              "null"
            ]
          },
          "top_p": {
            "type": [
              "number",
              "null"
            ]
          },
          "stop": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "seed": {
            "type": [
              "integer",
              "null"
            ]
          },
          "max_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "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. Campaign accounts accept only model, text-only messages (system/user/assistant), stream, stream_options.include_usage, max_tokens or max_completion_tokens (one only; a field sent as null counts as absent), temperature, top_p and seed. One choice, no tools, store field, images or extra parameters; total body at most 128 KiB. Omitted max_tokens defaults to min(512, configured output limit). Model must be eldrim-default; a missing or null model gets 404 model_not_found."
      },
      "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": {
            "enum": [
              1,
              null
            ],
            "default": 1
          },
          "best_of": {
            "enum": [
              1,
              null
            ],
            "default": 1
          },
          "echo": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false
          },
          "suffix": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider/model dependent."
          },
          "logprobs": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 5
          },
          "store": {
            "enum": [
              false,
              null
            ]
          },
          "stream": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false
          },
          "stream_options": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "include_usage": {
                "type": [
                  "boolean",
                  "null"
                ],
                "default": false
              }
            },
            "additionalProperties": true
          },
          "temperature": {
            "type": [
              "number",
              "null"
            ]
          },
          "top_p": {
            "type": [
              "number",
              "null"
            ]
          },
          "stop": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "seed": {
            "type": [
              "integer",
              "null"
            ]
          },
          "max_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "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",
              "null"
            ],
            "enum": [
              "float",
              "base64",
              null
            ],
            "default": "float"
          },
          "dimensions": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Optional reduced dimension count; provider/model dependent."
          },
          "user": {
            "type": [
              "string",
              "null"
            ]
          },
          "stream": {
            "enum": [
              false,
              null
            ]
          }
        },
        "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",
              "null"
            ]
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "stream": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false
          },
          "store": {
            "enum": [
              false,
              null
            ],
            "default": false
          },
          "background": {
            "enum": [
              false,
              null
            ]
          },
          "previous_response_id": {
            "type": "null"
          },
          "conversation": {
            "type": "null"
          },
          "tools": {
            "type": [
              "array",
              "null"
            ],
            "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"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "stream": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false
          },
          "tools": {
            "type": [
              "array",
              "null"
            ],
            "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"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object"
            }
          },
          "stream": {
            "enum": [
              false,
              null
            ]
          }
        },
        "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"
          },
          "billing_mode": {
            "enum": [
              "prepaid",
              "postpaid"
            ],
            "description": "prepaid: served while the balance is above zero. postpaid: served while the balance is above minus credit_limit_micro_sek; usage is invoiced monthly."
          },
          "credit_limit_micro_sek": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Postpaid credit limit in integer micro-SEK; null for a prepaid account."
          },
          "available_micro_sek": {
            "type": "integer",
            "description": "Signed integer micro-SEK the account may still spend: the balance plus the credit limit. Requests already running when it reached zero can take it below zero."
          },
          "available_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."
            }
          },
          "campaign": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CampaignGrant"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null for ordinary accounts; otherwise the token grant shared across every account key."
          }
        },
        "required": [
          "customer",
          "residency",
          "balance_micro_sek",
          "balance_sek",
          "billing_mode",
          "credit_limit_micro_sek",
          "available_micro_sek",
          "available_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"
          },
          "price_source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the price came from: list, contract:<contract id>/<version> for a customer contract price, or campaign:<family> for a request a campaign grant covered at zero price. Null for requests recorded before price sources existed. routing.price repeats the token prices charged."
          },
          "price_micro_usd": {
            "type": [
              "integer",
              "null"
            ],
            "description": "For a request at a USD contract price: its amount in micro-USD, tokens at the contract's micro-USD per million tokens rounded once, half up. price_micro_sek is this amount at the fixing in routing.price, rounded once, half up. Null otherwise."
          },
          "price_usd": {
            "type": [
              "string",
              "null"
            ],
            "description": "price_micro_usd as a decimal string with six decimals, for example \"0.000060\". Null when price_micro_usd is null."
          },
          "routing": {
            "type": [
              "object",
              "null"
            ],
            "description": "The routing decision: the account's policy and each route's status. A request refused by a concurrency cap carries admission, for example {\"refused\": \"key_concurrency\", \"cap\": 2}, and no route was tried."
          }
        },
        "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"
        ]
      },
      "CampaignGrant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "customer": {
            "type": "string"
          },
          "campaign": {
            "type": "string"
          },
          "continuation_url": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Exclusive UTC cutoff for new work."
          },
          "token_budget": {
            "type": "integer",
            "minimum": 0
          },
          "tokens_used": {
            "type": "integer",
            "minimum": 0
          },
          "tokens_reserved": {
            "type": "integer",
            "minimum": 0
          },
          "tokens_available": {
            "type": "integer",
            "minimum": 0
          },
          "valid": {
            "type": "boolean"
          },
          "suspended": {
            "type": "boolean"
          },
          "inference_enabled": {
            "type": "boolean"
          },
          "max_output": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Current output-token limit, null before configuration."
          }
        },
        "required": [
          "id",
          "customer",
          "campaign",
          "continuation_url",
          "expires_at",
          "token_budget",
          "tokens_used",
          "tokens_reserved",
          "tokens_available",
          "valid",
          "suspended",
          "inference_enabled",
          "max_output"
        ],
        "description": "The authenticated account’s shared campaign grant. Used plus reserved never exceeds its budget. Uncertain work keeps reservations until reconciliation. Financial balance remains separate."
      },
      "ProbeResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "check",
          "ts",
          "ok"
        ],
        "properties": {
          "check": {
            "type": "string",
            "description": "A configured check id; by default healthz, chat or qwen3.6-35b."
          },
          "ts": {
            "type": "string",
            "format": "date-time",
            "description": "When the check started: RFC 3339 with seconds and an offset, at most 24 hours old and 5 minutes ahead. With probe and check it identifies the result, so a resent result is stored once."
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 100,
            "maximum": 599,
            "description": "HTTP status the check received."
          },
          "latency_ms": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 3600000
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-z0-9][a-z0-9_.:-]{0,63}$",
            "description": "Short error code for a failed result, such as timeout or http_503. Never response content."
          }
        }
      },
      "ProbeBatch": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "probe",
          "results"
        ],
        "properties": {
          "probe": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9._-]{0,31}$",
            "description": "Name of the probe that ran the checks, such as homelab."
          },
          "results": {
            "type": "array",
            "minItems": 1,
            "maxItems": 60,
            "items": {
              "$ref": "#/components/schemas/ProbeResult"
            }
          }
        }
      },
      "ProbeIngestResult": {
        "type": "object",
        "required": [
          "accepted",
          "duplicates"
        ],
        "properties": {
          "accepted": {
            "type": "integer",
            "description": "Results stored by this request."
          },
          "duplicates": {
            "type": "integer",
            "description": "Results already stored for the same probe, check and start time."
          }
        }
      },
      "UptimeWindow": {
        "type": "object",
        "required": [
          "results",
          "basis_points",
          "percent",
          "measured_basis_points",
          "measured_percent",
          "since"
        ],
        "properties": {
          "results": {
            "type": "integer",
            "description": "Probe results in the window."
          },
          "basis_points": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Successful results as hundredths of a percent, rounded down; null without results."
          },
          "percent": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same as a decimal string with two places, such as 99.93."
          },
          "measured_basis_points": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Minutes with a result as hundredths of a percent of the whole minutes since the window or the first result began, rounded down, at most 10000."
          },
          "measured_percent": {
            "type": [
              "string",
              "null"
            ]
          },
          "since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start of the measured period: the window's start, or the check's first result if later."
          }
        }
      },
      "CheckStatus": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "state",
          "last_result_at",
          "uptime"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "up",
              "down",
              "unknown"
            ],
            "description": "From the latest result; unknown when it started more than five minutes ago."
          },
          "last_result_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uptime": {
            "type": "object",
            "required": [
              "24h",
              "7d",
              "30d"
            ],
            "properties": {
              "24h": {
                "$ref": "#/components/schemas/UptimeWindow"
              },
              "7d": {
                "$ref": "#/components/schemas/UptimeWindow"
              },
              "30d": {
                "$ref": "#/components/schemas/UptimeWindow"
              }
            }
          }
        }
      },
      "ServiceStatus": {
        "type": "object",
        "required": [
          "status",
          "updated_at",
          "checks",
          "method"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "up",
              "degraded",
              "down",
              "unknown"
            ],
            "description": "From the checks with a fresh result: up when all pass, down when all fail, degraded when some fail, unknown when none is fresh."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckStatus"
            },
            "description": "Configured checks with results in the last 30 days."
          },
          "method": {
            "type": "string",
            "description": "How the figures are measured."
          }
        }
      },
      "MarketplaceModels": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "description": "Present with format=edenai."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            },
            "description": "OpenRouter ModelDocumentV2 objects, or with format=edenai Eden AI model entries: id, object, created, owned_by, model_name, hugging_face_id, context_length, capabilities, pricing (input_cost_per_token and output_cost_per_token as decimal strings) and regions."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid input, a required field missing or null, 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": "A prepaid account needs a positive balance before inference, including token-count requests: type insufficient_quota. A postpaid account is served until its balance reaches minus its credit limit, then refused with type credit_limit_reached.",
        "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. Campaign grants can return campaign_expired; campaign top-ups return campaign_sponsored. An expired key itself is 401.",
        "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. concurrency_limit_exceeded: the API key or the account already has as many requests in progress as its operator-set concurrency cap; nothing was sent to a provider, and the request record names the cap in routing.admission. overloaded: for marketplace accounts only, every eligible source is at the capacity the account may use, or the provider answered 429 (other accounts get 503 overloaded or 502). Campaign codes: campaign_rate_limited (temporary), campaign_budget_unavailable (available tokens smaller than reserved request bound), campaign_quota_exceeded (settled budget exhausted). Only temporary rate limits carry Retry-After.",
        "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, providers recovering, every eligible source at its measured capacity (overloaded), or prices could not be read (price_unavailable; nothing was sent or charged). campaign_unavailable identifies disabled or temporarily unavailable campaign capacity, with Retry-After: 5.",
        "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"
  }
}
