{
  "components": {
    "schemas": {
      "AnthropicContentBlock": {
        "description": "One block of Anthropic message content: text or an image.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/AnthropicTextBlock"
          },
          {
            "$ref": "#/components/schemas/AnthropicImageBlock"
          }
        ]
      },
      "AnthropicImageBlock": {
        "properties": {
          "source": {
            "properties": {
              "data": {
                "description": "Base64-encoded image data (source type `base64`).",
                "type": "string"
              },
              "media_type": {
                "description": "Image MIME type, e.g. `image/png`.",
                "type": "string"
              },
              "type": {
                "enum": [
                  "base64",
                  "url"
                ],
                "type": "string"
              },
              "url": {
                "description": "Image URL (source type `url`).",
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          "type": {
            "const": "image",
            "type": "string"
          }
        },
        "required": [
          "source",
          "type"
        ],
        "type": "object"
      },
      "AnthropicMessage": {
        "description": "One message in the conversation, oldest first.",
        "properties": {
          "content": {
            "description": "Message content: plain text or an array of content blocks.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/AnthropicContentBlock"
                },
                "type": "array"
              }
            ]
          },
          "role": {
            "enum": [
              "user",
              "assistant"
            ],
            "type": "string"
          }
        },
        "required": [
          "content",
          "role"
        ],
        "type": "object"
      },
      "AnthropicMessageRequest": {
        "properties": {
          "max_tokens": {
            "description": "Upper bound on generated tokens. Required by the Anthropic API.",
            "type": "integer"
          },
          "messages": {
            "description": "Conversation so far, oldest first.",
            "items": {
              "$ref": "#/components/schemas/AnthropicMessage"
            },
            "type": "array"
          },
          "model": {
            "description": "Model id from GET /v1/models: the default provider's bare id (e.g. `zai-org/GLM-5.3`) or a `provider/model` id to pick a specific provider.",
            "type": "string"
          },
          "stream": {
            "default": false,
            "description": "Set true to receive the response as a stream of server-sent events instead of a single JSON object.",
            "type": "boolean"
          },
          "system": {
            "description": "System prompt: plain text or an array of content blocks.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/AnthropicContentBlock"
                },
                "type": "array"
              }
            ]
          },
          "temperature": {
            "description": "Sampling temperature (0-1); defaults to the model's value.",
            "type": "number"
          },
          "top_p": {
            "description": "Nucleus sampling cutoff; defaults to the model's value.",
            "type": "number"
          }
        },
        "required": [
          "max_tokens",
          "messages",
          "model"
        ],
        "type": "object"
      },
      "AnthropicMessageResponse": {
        "properties": {
          "content": {
            "items": {
              "$ref": "#/components/schemas/AnthropicContentBlock"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "description": "Model id that served the request.",
            "type": "string"
          },
          "role": {
            "const": "assistant",
            "type": "string"
          },
          "stop_reason": {
            "description": "Why generation stopped.",
            "enum": [
              "end_turn",
              "max_tokens",
              "stop_sequence"
            ],
            "type": "string"
          },
          "type": {
            "const": "message",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/AnthropicUsage"
          }
        },
        "type": "object"
      },
      "AnthropicTextBlock": {
        "properties": {
          "text": {
            "type": "string"
          },
          "type": {
            "const": "text",
            "type": "string"
          }
        },
        "required": [
          "text",
          "type"
        ],
        "type": "object"
      },
      "AnthropicUsage": {
        "properties": {
          "input_tokens": {
            "type": "integer"
          },
          "output_tokens": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ChatCompletionChunk": {
        "properties": {
          "choices": {
            "items": {
              "$ref": "#/components/schemas/ChatCompletionChunkChoice"
            },
            "type": "array"
          },
          "created": {
            "description": "Unix timestamp (seconds).",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "description": "Model id that served the request.",
            "type": "string"
          },
          "object": {
            "const": "chat.completion.chunk",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChatCompletionChunkChoice": {
        "properties": {
          "delta": {
            "description": "Partial message delta; the first chunk carries `role`, later chunks carry incremental `content`.",
            "properties": {
              "content": {
                "type": "string"
              },
              "role": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "finish_reason": {
            "description": "Null while the response is still streaming; \"stop\", \"length\", or \"content_filter\" on the final chunk.",
            "enum": [
              null,
              "stop",
              "length",
              "content_filter"
            ]
          },
          "index": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ChatCompletionMessage": {
        "properties": {
          "content": {
            "description": "Generated text; null if the model refused to answer.",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "const": "assistant",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChatCompletionRequest": {
        "properties": {
          "max_completion_tokens": {
            "description": "Upper bound on generated tokens.",
            "type": "integer"
          },
          "max_tokens": {
            "deprecated": true,
            "description": "Deprecated alias for max_completion_tokens.",
            "type": "integer"
          },
          "messages": {
            "description": "Conversation so far, oldest first.",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "type": "array"
          },
          "model": {
            "description": "Model id from GET /v1/models: the default provider's bare id (e.g. `zai-org/GLM-5.3`) or a `provider/model` id to pick a specific provider.",
            "example": "zai-org/GLM-5.3",
            "type": "string"
          },
          "stream": {
            "default": false,
            "description": "Set true to receive the completion as a stream of server-sent events instead of a single JSON object.",
            "type": "boolean"
          },
          "temperature": {
            "description": "Sampling temperature (0-2); defaults to the model's value.",
            "type": "number"
          },
          "top_p": {
            "description": "Nucleus sampling cutoff; defaults to the model's value.",
            "type": "number"
          }
        },
        "required": [
          "messages",
          "model"
        ],
        "type": "object"
      },
      "ChatCompletionResponse": {
        "properties": {
          "choices": {
            "items": {
              "$ref": "#/components/schemas/ChatCompletionResponseChoice"
            },
            "type": "array"
          },
          "created": {
            "description": "Unix timestamp (seconds).",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "description": "Model id that served the request.",
            "type": "string"
          },
          "object": {
            "const": "chat.completion",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "type": "object"
      },
      "ChatCompletionResponseChoice": {
        "properties": {
          "finish_reason": {
            "description": "Why generation stopped: \"stop\" (natural end or stop sequence), \"length\" (token limit), \"content_filter\" (blocked).",
            "enum": [
              "stop",
              "length",
              "content_filter"
            ],
            "type": "string"
          },
          "index": {
            "type": "integer"
          },
          "message": {
            "$ref": "#/components/schemas/ChatCompletionMessage"
          }
        },
        "type": "object"
      },
      "ChatMessage": {
        "description": "One message in the conversation. Content is either plain text or an array of parts; images are passed as `image_url` parts.",
        "properties": {
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ContentPart"
                },
                "type": "array"
              }
            ]
          },
          "role": {
            "description": "Conversation role. `system` sets behavior, `user` is the prompt, `assistant` is a previous reply.",
            "enum": [
              "system",
              "user",
              "assistant"
            ],
            "type": "string"
          }
        },
        "required": [
          "content",
          "role"
        ],
        "type": "object"
      },
      "ContentPart": {
        "description": "A piece of message content: text or an image.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextContentPart"
          },
          {
            "$ref": "#/components/schemas/ImageContentPart"
          }
        ]
      },
      "Embedding": {
        "properties": {
          "embedding": {
            "description": "The embedding vector (list of floats).",
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "index": {
            "description": "Position of this item in the request input.",
            "type": "integer"
          },
          "object": {
            "const": "embedding",
            "type": "string"
          }
        },
        "required": [
          "embedding",
          "index",
          "object"
        ],
        "type": "object"
      },
      "EmbeddingRequest": {
        "properties": {
          "dimensions": {
            "description": "Optional output dimensionality, for models that support it.",
            "type": "integer"
          },
          "encoding_format": {
            "description": "Encoding of the returned vectors; only `float` is supported.",
            "type": "string"
          },
          "input": {
            "description": "Text to embed: a single string, or an array of strings to embed in one request.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ]
          },
          "model": {
            "description": "Embedding model id from GET /v1/models (e.g. `BAAI/bge-large-en-v1.5`).",
            "example": "BAAI/bge-large-en-v1.5",
            "type": "string"
          }
        },
        "required": [
          "input",
          "model"
        ],
        "type": "object"
      },
      "EmbeddingResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Embedding"
            },
            "type": "array"
          },
          "model": {
            "description": "Model id that served the request.",
            "type": "string"
          },
          "object": {
            "const": "list",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/EmbeddingUsage"
          }
        },
        "type": "object"
      },
      "EmbeddingUsage": {
        "properties": {
          "prompt_tokens": {
            "type": "integer"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "description": "Stable machine-readable error code, when available.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable description of the error.",
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "message"
            ],
            "type": "object"
          }
        },
        "type": "object"
      },
      "ImageContentPart": {
        "properties": {
          "image_url": {
            "properties": {
              "detail": {
                "default": "auto",
                "description": "Image processing fidelity; low/high consume fewer/more tokens than auto.",
                "enum": [
                  "auto",
                  "low",
                  "high"
                ],
                "type": "string"
              },
              "url": {
                "description": "Image URL, or a base64 data URI (e.g. `data:image/png;base64,...`).",
                "type": "string"
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          },
          "type": {
            "const": "image_url",
            "type": "string"
          }
        },
        "required": [
          "image_url",
          "type"
        ],
        "type": "object"
      },
      "Model": {
        "properties": {
          "id": {
            "description": "Model id to send as the `model` field in POST /v1/chat/completions. The default provider's entries use the bare model id (e.g. `zai-org/GLM-5.3`); each other provider is a separate entry with a `provider/model` id. The full OpenRouter consumer schema (pricing, architecture, reasoning metadata) is returned but not documented in this spec.",
            "type": "string"
          },
          "object": {
            "const": "model",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "ModelList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Model"
            },
            "type": "array"
          },
          "object": {
            "const": "list",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResponsesInputMessage": {
        "description": "One message in the conversation, oldest first.",
        "properties": {
          "content": {
            "description": "Message content: plain text or an array of parts; images are passed as `image_url` parts.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ContentPart"
                },
                "type": "array"
              }
            ]
          },
          "role": {
            "enum": [
              "system",
              "user",
              "assistant"
            ],
            "type": "string"
          }
        },
        "required": [
          "content",
          "role"
        ],
        "type": "object"
      },
      "ResponsesRequest": {
        "properties": {
          "input": {
            "description": "The prompt: a string or the conversation as an array of messages, oldest first.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ResponsesInputMessage"
                },
                "type": "array"
              }
            ]
          },
          "instructions": {
            "description": "System prompt for the response.",
            "type": "string"
          },
          "max_output_tokens": {
            "description": "Upper bound on generated tokens.",
            "type": "integer"
          },
          "model": {
            "description": "Model id from GET /v1/models: the default provider's bare id (e.g. `zai-org/GLM-5.3`) or a `provider/model` id to pick a specific provider.",
            "type": "string"
          },
          "stream": {
            "default": false,
            "description": "Set true to receive the response as a stream of server-sent events instead of a single JSON object.",
            "type": "boolean"
          },
          "temperature": {
            "description": "Sampling temperature (0-2); defaults to the model's value.",
            "type": "number"
          },
          "top_p": {
            "description": "Nucleus sampling cutoff; defaults to the model's value.",
            "type": "number"
          }
        },
        "required": [
          "input",
          "model"
        ],
        "type": "object"
      },
      "ResponsesResponse": {
        "properties": {
          "created_at": {
            "description": "Unix timestamp (seconds).",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "description": "Model id that served the request.",
            "type": "string"
          },
          "object": {
            "const": "response",
            "type": "string"
          },
          "output": {
            "description": "Generated output; contains one `message` item with the assistant reply.",
            "items": {
              "properties": {
                "content": {
                  "items": {
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "type": {
                        "const": "output_text",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                },
                "role": {
                  "const": "assistant",
                  "type": "string"
                },
                "type": {
                  "const": "message",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "status": {
            "description": "Whether the response finished: `completed`, `incomplete` (token limit), or `failed`.",
            "enum": [
              "completed",
              "incomplete",
              "failed"
            ],
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "type": "object"
      },
      "SystemOneAnswer": {
        "description": "One typed answer in a System One response.",
        "properties": {
          "choice": {
            "description": "Selected option for a choice question.",
            "type": "string"
          },
          "confidence": {
            "description": "Model confidence in the answer, from 0 to 1.",
            "type": "number"
          },
          "legend": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Descriptions for score levels, keyed by level index.",
            "type": "object"
          },
          "noul": {
            "description": "Probability from 0 to 1 for a noul (predicate) question.",
            "type": "number"
          },
          "probabilities": {
            "additionalProperties": {
              "type": "number"
            },
            "description": "Probability distribution over option values (choice) or level indexes (score).",
            "type": "object"
          },
          "score": {
            "description": "Probability-weighted rubric value for a score question.",
            "type": "number"
          },
          "type": {
            "enum": [
              "noul",
              "choice",
              "score"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "SystemOneQuestion": {
        "description": "One named question in a System One request.",
        "properties": {
          "criteria": {
            "description": "Optional true/false descriptions for noul, an option-to-description map for choice, or ordered level descriptions for score.",
            "oneOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ]
          },
          "instructions": {
            "description": "Question instructions: a string or structured data.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ]
          },
          "type": {
            "enum": [
              "noul",
              "choice",
              "score"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "instructions"
        ],
        "type": "object"
      },
      "SystemOneRequest": {
        "properties": {
          "model": {
            "description": "Decision model identifier, for example jev-1.13.0.",
            "type": "string"
          },
          "questions": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SystemOneQuestion"
            },
            "description": "Map of question names to questions. The names become the keys of the response answers.",
            "minProperties": 1,
            "type": "object"
          },
          "state": {
            "description": "The state to evaluate: a string or structured data.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ]
          }
        },
        "required": [
          "state",
          "model",
          "questions"
        ],
        "type": "object"
      },
      "SystemOneResponse": {
        "properties": {
          "answers": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SystemOneAnswer"
            },
            "description": "Map of question names to typed answers.",
            "type": "object"
          },
          "model": {
            "description": "Resolved model version that answered.",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/SystemOneUsage"
          }
        },
        "required": [
          "model",
          "answers"
        ],
        "type": "object"
      },
      "SystemOneUsage": {
        "properties": {
          "input_tokens": {
            "type": "integer"
          },
          "output_tokens": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TextContentPart": {
        "properties": {
          "text": {
            "type": "string"
          },
          "type": {
            "const": "text",
            "type": "string"
          }
        },
        "required": [
          "text",
          "type"
        ],
        "type": "object"
      },
      "Usage": {
        "properties": {
          "completion_tokens": {
            "type": "integer"
          },
          "prompt_tokens": {
            "type": "integer"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "bearerFormat": "sk-bf-...",
        "description": "A TrustedTokens API key (`sk-bf-...`) from the account dashboard. Send it as `Authorization: Bearer <key>`. The same key authenticates every endpoint in this spec.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Public inference API of TrustedTokens (https://trustedtokens.eu). Every endpoint requires a TrustedTokens API key. This spec documents the supported surface: chat completions, responses, Anthropic messages, embeddings, and System One decisions — the chat and Anthropic endpoints with optional SSE streaming and image inputs. Deliberately minimal, without tool calling or other advanced features.",
    "title": "TrustedTokens API",
    "version": "1.3.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/anthropic/v1/messages": {
      "post": {
        "description": "Creates a message using the Anthropic Messages API format. Images are passed as `image` content blocks. Set `stream: true` to receive the response incrementally as server-sent events: `message_start`, `content_block_delta` (incremental text in `delta.text`), `message_delta` (stop reason and usage), and `message_stop`.",
        "operationId": "createAnthropicMessage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnthropicMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnthropicMessageResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "SSE stream sent when `stream: true`: Anthropic events `message_start`, `content_block_delta` (text deltas), `message_delta` (stop reason and usage), and `message_stop`.",
                  "items": {
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Message response, or an event stream when `stream: true`."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request (unknown model, malformed messages, or unsupported parameters)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing or invalid API key."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal server error."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create a message",
        "tags": [
          "Anthropic Integration"
        ]
      }
    },
    "/v1/chat/completions": {
      "post": {
        "description": "Creates a completion for the provided messages. Images are passed as `image_url` content parts. Set `stream: true` to receive the completion incrementally as server-sent events: each `data:` line carries one `chat.completion.chunk` JSON object, and the stream terminates with a `data: [DONE]` sentinel.",
        "operationId": "createChatCompletion",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "SSE stream sent when `stream: true`: one `chat.completion.chunk` object per `data:` line, terminated by `data: [DONE]`.",
                  "items": {
                    "$ref": "#/components/schemas/ChatCompletionChunk"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Chat completion, or a chunk stream when `stream: true`."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request (unknown model, malformed messages, or unsupported parameters)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing or invalid API key."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal server error."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create a chat completion",
        "tags": [
          "Chat Completions"
        ]
      }
    },
    "/v1/embeddings": {
      "post": {
        "description": "Creates embedding vectors for the provided input text. Embedding models are non-chat: they produce no completion. Each item in `data` carries the vector for one input, in request order.",
        "operationId": "createEmbedding",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingResponse"
                }
              }
            },
            "description": "Embedding response."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request (unknown model, malformed input, or unsupported parameters)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing or invalid API key."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal server error."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create embeddings",
        "tags": [
          "Embeddings"
        ]
      }
    },
    "/v1/models": {
      "get": {
        "description": "List the models available to your API key. The default provider's entries use the bare model id (e.g. `zai-org/GLM-5.3`); each other provider is a separate entry with a `provider/model` id that can be sent as the `model` field in `/v1/chat/completions`. Embedding models (for `/v1/embeddings`) are listed here too; they are marked by `architecture.output_modalities: [\"embeddings\"]` in the full model metadata.",
        "operationId": "listModels",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelList"
                }
              }
            },
            "description": "Model list. Each entry follows the OpenRouter consumer `Model` schema, which extends the OpenAI model schema with pricing, architecture, and reasoning metadata; only the fields needed to call the API are documented here."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing or invalid API key."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List available models",
        "tags": [
          "Models"
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "description": "Creates a response using the OpenAI Responses API format. Images are passed as `image_url` content parts. Set `stream: true` to receive the response incrementally as server-sent events: `response.output_text.delta` events carry incremental text in `delta`, and `response.completed` carries the full Response object.",
        "operationId": "createResponse",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponsesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponsesResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "description": "SSE stream sent when `stream: true`: Responses API events such as `response.output_text.delta` (incremental text in `delta`), ending with `response.completed` carrying the full Response object.",
                  "items": {
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Response object, or an event stream when `stream: true`."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request (unknown model, malformed input, or unsupported parameters)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing or invalid API key."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal server error."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Create a response",
        "tags": [
          "Responses"
        ]
      }
    },
    "/v1/systemone": {
      "post": {
        "description": "Evaluates state against named questions using TypeSafe's System One API. Decision models answer with one typed result per question: a probability, a selected option, or a rubric score. Non-streaming.",
        "operationId": "createSystemOne",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SystemOneRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemOneResponse"
                }
              }
            },
            "description": "System One response."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request (unknown model, malformed state, or invalid questions)."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing or invalid API key."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal server error."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Evaluate state (System One)",
        "tags": [
          "Decisions"
        ]
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "description": "TrustedTokens public inference API",
      "url": "https://api.trustedtokens.eu"
    }
  ],
  "tags": [
    {
      "description": "Anthropic-compatible messages API.",
      "name": "Anthropic Integration"
    },
    {
      "description": "OpenAI-compatible chat completions with SSE streaming and image inputs.",
      "name": "Chat Completions"
    },
    {
      "description": "OpenAI-compatible embeddings for non-chat (embedding) models.",
      "name": "Embeddings"
    },
    {
      "description": "Model catalogue.",
      "name": "Models"
    },
    {
      "description": "OpenAI-compatible responses API with SSE streaming and image inputs.",
      "name": "Responses"
    }
  ]
}
