{
  "openapi": "3.1.0",
  "info": {
    "title": "Sylphx Models Product Contract",
    "version": "1.0.0",
    "description": "Sole public schema for Sylphx Models. The customer IR uses the official OpenAI Responses document with the documented Sylphx hosted-tool engine extension. Default peel is https://api.models.sylphx.ai/v1 with Authorization: Bearer sk-sx-…. Not Binding. OpenAI-compatible wire is this contract, not a second schema. Platform sylphx-sdk / sylphx-cli is not this product."
  },
  "servers": [
    {
      "url": "https://api.models.sylphx.ai/v1",
      "description": "Dest peel (AI-PEEL-HOST)"
    }
  ],
  "security": [
    {
      "ServiceKey": []
    }
  ],
  "x-sylphx": {
    "product": "models",
    "envelope": "sk-sx-…",
    "key_prefix": "sk-sx-",
    "default_api_base": "https://api.models.sylphx.ai/v1",
    "not": [
      "Binding",
      "sylphx-sdk",
      "sylphx-cli",
      "ai.api.sylphx.com"
    ],
    "conversation_roots": [
      "AI-CATALOG",
      "AI-RESPONSES"
    ],
    "identities": [
      "AI-TS-SDK",
      "AI-RUST-SDK",
      "AI-RUST-CLI"
    ]
  },
  "tags": [
    {
      "name": "Responses",
      "description": "Official OpenAI Responses conversation root"
    },
    {
      "name": "Catalog",
      "description": "Public catalog conversation root"
    },
    {
      "name": "Files",
      "description": "Files for Responses file_id"
    },
    {
      "name": "Retired",
      "description": "Named retired doors; not dest"
    }
  ],
  "paths": {
    "/responses": {
      "post": {
        "operationId": "createResponse",
        "summary": "Create a response",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "x-ratelimit-limit": {
                "description": "Request allowance for the active tier.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Remaining requests in the active window.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds when the active window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "An identical idempotency request is still in progress.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Request allowance for the active tier.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Remaining requests in the active window.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds when the active window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "The Idempotency-Key was reused with a different request body.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Request allowance for the active tier.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Remaining requests in the active window.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds when the active window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate, concurrency, or spend limit was reached.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Request allowance for the active tier.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Remaining requests in the active window.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds when the active window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retry.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Gateway or upstream admission failure.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Request allowance for the active tier.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Remaining requests in the active window.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds when the active window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateResponse"
              }
            }
          }
        },
        "x-sylphx-sse": true,
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Client-scoped durable retry key. A UUID is recommended. Completed identical retries replay the original response.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "example": "8f8d57c8-8868-4d90-90cb-55e892cb80a5"
          }
        ]
      }
    },
    "/responses/compact": {
      "post": {
        "operationId": "compactResponse",
        "summary": "Compact a stored response",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompactResponse"
              }
            }
          }
        }
      }
    },
    "/responses/{response_id}": {
      "parameters": [
        {
          "name": "response_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getResponse",
        "summary": "Retrieve a stored response",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteResponse",
        "summary": "Delete a stored response",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/responses/{response_id}/input_items": {
      "parameters": [
        {
          "name": "response_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "listResponseInputItems",
        "summary": "List stored input items",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/responses/{response_id}/cancel": {
      "parameters": [
        {
          "name": "response_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "operationId": "cancelResponse",
        "summary": "Cancel a response",
        "tags": [
          "Responses"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/models": {
      "get": {
        "operationId": "listModels",
        "summary": "List authenticated catalog models",
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/models/{model}": {
      "parameters": [
        {
          "name": "model",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getModel",
        "summary": "Get one public model",
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/public/models": {
      "get": {
        "operationId": "listPublicModels",
        "summary": "List unauthenticated public catalog",
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/public/models/{model}": {
      "parameters": [
        {
          "name": "model",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getPublicModel",
        "summary": "Get one public catalog model",
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "error": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/files": {
      "post": {
        "operationId": "createFile",
        "summary": "Upload a file",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Official OpenAI or this product's catalog JSON document."
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listFiles",
        "summary": "List files",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/files/{file_id}": {
      "parameters": [
        {
          "name": "file_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getFile",
        "summary": "Get file metadata",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteFile",
        "summary": "Delete a file",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/files/{file_id}/content": {
      "parameters": [
        {
          "name": "file_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "operationId": "getFileContent",
        "summary": "Download file bytes",
        "tags": [
          "Files"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Official OpenAI or this product's catalog JSON document."
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/chat/completions": {
      "post": {
        "operationId": "createChatCompletion",
        "summary": "Retired Chat Completions facade",
        "tags": [
          "Retired"
        ],
        "responses": {
          "404": {
            "description": "chat_completions_retired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Official OpenAI or this product's catalog JSON document."
              }
            }
          }
        },
        "deprecated": true,
        "x-sylphx-retired": "chat_completions_retired"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ServiceKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sk-sx-…",
        "description": "AI product key Authorization: Bearer sk-sx-…. Not Binding."
      }
    },
    "schemas": {
      "CreateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model"
        ],
        "description": "Official OpenAI CreateResponse top-level keys (OpenAPI 2.3.0). Unknown keys fail closed. Nested shapes use the official document except the documented Sylphx hosted-tool engine extension.",
        "properties": {
          "background": {
            "description": "Official OpenAI Responses `background` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "boolean"
          },
          "client_metadata": {
            "description": "Official OpenAI Responses `client_metadata` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "context_management": {
            "description": "Official OpenAI Responses `context_management` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "conversation": {
            "description": "Official OpenAI Responses `conversation` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "include": {
            "description": "Official OpenAI Responses `include` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "input": {
            "description": "Official OpenAI Responses `input` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "instructions": {
            "description": "Official OpenAI Responses `instructions` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "max_output_tokens": {
            "description": "Official OpenAI Responses `max_output_tokens` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "integer"
          },
          "max_tool_calls": {
            "description": "Official OpenAI Responses `max_tool_calls` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "integer"
          },
          "metadata": {
            "description": "Official OpenAI Responses `metadata` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "model": {
            "description": "Official OpenAI Responses `model` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "string"
          },
          "moderation": {
            "description": "Official OpenAI Responses `moderation` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "parallel_tool_calls": {
            "description": "Official OpenAI Responses `parallel_tool_calls` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "boolean"
          },
          "previous_response_id": {
            "description": "Official OpenAI Responses `previous_response_id` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "prompt": {
            "description": "Official OpenAI Responses `prompt` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "prompt_cache_key": {
            "description": "Official OpenAI Responses `prompt_cache_key` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "prompt_cache_options": {
            "description": "Official OpenAI Responses `prompt_cache_options` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "prompt_cache_retention": {
            "description": "Official OpenAI Responses `prompt_cache_retention` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "reasoning": {
            "description": "Official OpenAI Responses `reasoning` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "safety_identifier": {
            "description": "Official OpenAI Responses `safety_identifier` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "service_tier": {
            "description": "Official OpenAI Responses `service_tier` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "store": {
            "description": "Official OpenAI Responses `store` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "boolean"
          },
          "stream": {
            "description": "Official OpenAI Responses `stream` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "boolean"
          },
          "stream_options": {
            "description": "Official OpenAI Responses `stream_options` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "temperature": {
            "description": "Official OpenAI Responses `temperature` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "number"
          },
          "text": {
            "description": "Official OpenAI Responses `text` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "tool_choice": {
            "description": "Official OpenAI Responses `tool_choice` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "tools": {
            "description": "Responses tools. Sylphx hosted web_search and web_fetch accept an engine selection fixed for this request: omission is auto; named engines and native are strict. Native availability and supported options depend on verified route capabilities. Hosted web tools also accept client-side cost and context knobs: the model still calls the tool with a single argument (query for web_search, url for web_fetch), while engine, mode, result counts, character budgets, call budgets, and domain filters are declared here. Every admitted setting is enforced by the platform; a setting no candidate engine can honor is rejected instead of ignored. Other tool shapes retain their official contract.",
            "type": "array",
            "items": {
              "allOf": [
                {
                  "if": {
                    "type": "object",
                    "required": [
                      "type"
                    ],
                    "properties": {
                      "type": {
                        "enum": [
                          "web_search",
                          "web_search_2025_08_26",
                          "web_search_preview",
                          "web_search_preview_2025_03_11"
                        ]
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "engine": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "native",
                          "parallel",
                          "exa",
                          "firecrawl",
                          "perplexity",
                          "brave",
                          "tavily",
                          "anysearch"
                        ],
                        "default": "auto"
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "instant",
                          "fast",
                          "auto",
                          "deep-lite",
                          "deep",
                          "deep-reasoning",
                          "turbo",
                          "basic",
                          "advanced"
                        ],
                        "description": "Engine-specific search depth. Exa accepts instant, fast, auto, deep-lite, deep, deep-reasoning; Parallel accepts turbo, fast, basic, advanced. A selected engine that cannot honor the mode fails the request instead of ignoring it."
                      },
                      "max_results": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 25,
                        "description": "Maximum results per search call (1-25; 1-20 for Perplexity). A supplier returning more is capped at this boundary."
                      },
                      "max_total_results": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000,
                        "description": "Cumulative cap on the results returned to the model across every search call in this request. Once reached, later searches return a limit result and perform no search."
                      },
                      "max_characters": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000,
                        "description": "Exact maximum characters of content per result. Takes precedence over search_context_size."
                      },
                      "max_uses": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000,
                        "description": "Maximum number of searches the model may execute in this request. Once reached, later searches return a limit result and perform no search."
                      },
                      "search_context_size": {
                        "type": "string",
                        "enum": [
                          "low",
                          "medium",
                          "high"
                        ],
                        "description": "Adaptive context budget for an engine that can carry one. Overridden by max_characters."
                      },
                      "allowed_domains": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "description": "Only these domains may appear in results."
                      },
                      "excluded_domains": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "description": "Results from these domains are excluded (synonym of blocked_domains)."
                      },
                      "blocked_domains": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "description": "Results from these domains are excluded."
                      }
                    }
                  }
                },
                {
                  "if": {
                    "type": "object",
                    "required": [
                      "type"
                    ],
                    "properties": {
                      "type": {
                        "enum": [
                          "web_fetch"
                        ]
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "engine": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "native",
                          "parallel",
                          "exa",
                          "firecrawl",
                          "tavily",
                          "anysearch"
                        ],
                        "default": "auto"
                      },
                      "max_uses": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000,
                        "description": "Maximum number of retrievals the model may execute in this request. Once reached, later fetches return a limit result and perform no retrieval."
                      },
                      "max_content_tokens": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1000000,
                        "description": "Approximate content cap in tokens, applied as an exact character truncation at the retrieval boundary. The platform's single-page bound remains an upper limit."
                      },
                      "allowed_domains": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "description": "Only URLs from these domains are fetched."
                      },
                      "blocked_domains": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "description": "URLs from these domains are never fetched (synonym of excluded_domains)."
                      },
                      "excluded_domains": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "description": "URLs from these domains are never fetched."
                      }
                    }
                  }
                }
              ]
            }
          },
          "top_logprobs": {
            "description": "Official OpenAI Responses `top_logprobs` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "integer"
          },
          "top_p": {
            "description": "Official OpenAI Responses `top_p` field. Nested shape is the official OpenAI document, not a second Sylphx schema.",
            "type": "number"
          },
          "truncation": {
            "description": "Official OpenAI Responses `truncation` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          },
          "user": {
            "description": "Official OpenAI Responses `user` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          }
        }
      },
      "CompactResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "model": {
            "type": "string"
          },
          "previous_response_id": {
            "type": "string"
          },
          "input": {
            "description": "Official OpenAI Responses `input` field. Nested shape is the official OpenAI document, not a second Sylphx schema."
          }
        }
      },
      "ResponseObject": {
        "type": "object",
        "additionalProperties": true,
        "description": "Official OpenAI or this product's catalog JSON document."
      },
      "ErrorEnvelope": {
        "type": "object",
        "additionalProperties": true,
        "description": "Typed error envelope. The machine-readable fields (code, summary, retryable, next_action, retry_after_seconds) sit at the top level next to the official OpenAI-style `error` object, exactly as the API emits them; `next_action` and `retry_after_seconds` are null when no action or delay applies.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable error code, the same identity as `error.code`."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable human-readable summary; null when the API has none."
          },
          "retryable": {
            "type": "boolean",
            "description": "Whether an identical retry can succeed after the advertised delay."
          },
          "next_action": {
            "type": [
              "string",
              "null"
            ],
            "description": "Customer action that can resolve the error; null when none applies."
          },
          "retry_after_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Recommended delay before retry; null when not applicable."
          },
          "error": {
            "type": "object",
            "additionalProperties": true,
            "description": "Official OpenAI-style error object.",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "param": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      }
    }
  }
}
