{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {},
    "responses": {},
    "parameters": {},
    "examples": {},
    "requestBodies": {},
    "headers": {},
    "links": {},
    "callbacks": {},
    "pathItems": {}
  },
  "info": {
    "description": "",
    "title": "OpenAI Web Search (GEO)",
    "version": "1",
    "x-aisa-capabilities": {
      "idempotency": "Idempotency-Key",
      "max_price": "X-AISA-Max-Price-USD",
      "quote": {
        "header": "X-AISA-Cost-Mode",
        "value": "quote"
      }
    },
    "x-aisa-configured-paths": [
      "/apis/v1/openai-websearch/search"
    ],
    "x-aisa-document": {
      "facts_hash": "ef23b251376b327f7b60ff399bdd4d51ed6b5646174adbf34fb19d7988f5e01f",
      "generator_version": "3",
      "protocol_version": "1",
      "schema_version": "1",
      "composer_version": "20",
      "response_pending": [],
      "document_hash": "sha256:5d3d36167f0b78ba3b9b418202cb7a36abd715bf708e312bc3de0bc132e4cd20"
    },
    "x-aisa-plans": {
      "builder": 1.0,
      "display_plan": "payg",
      "payg": 1.0,
      "similarweb_payg": 1.0,
      "team": 1.0,
      "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
    },
    "x-aisa-provider": "openai-web-search",
    "x-aisa-catalogs": {
      "openai-web-search": {
        "title": "OpenAI Web Search (GEO)",
        "description": "",
        "x-aisa-document": {
          "facts_hash": "ef23b251376b327f7b60ff399bdd4d51ed6b5646174adbf34fb19d7988f5e01f",
          "generator_version": "3",
          "protocol_version": "1",
          "schema_version": "1"
        },
        "x-aisa-plans": {
          "builder": 1.0,
          "display_plan": "payg",
          "payg": 1.0,
          "similarweb_payg": 1.0,
          "team": 1.0,
          "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
        },
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          }
        }
      }
    }
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "paths": {
    "/apis/v1/openai-websearch/search": {
      "post": {
        "description": "Ask a question and get an answer that an OpenAI model wrote after searching the live web. Send a Responses request — an `input` string (or message array) — and the endpoint injects a fixed, server-pinned model and the `web_search` tool for you; the model, tool and per-request search cap are server-controlled to keep cost bounded. The reply is a standard OpenAI Responses object: `output[]` contains `web_search_call` items (each a search that ran) and a `message` item with the answer text and URL citations, and the billed search count equals the number of `web_search_call` items.  Use this when you want a written, cited answer grounded in current web content from an OpenAI model — for the Anthropic-model equivalent see [`post_anthropic_websearch_search`](/api-reference/search/post_anthropic-websearch-search), and for raw ranked links with extracted page text use [`post_tavily_search`](/api-reference/search/post_tavily-search).\n\n<!-- aisa-pricing:start -->\nUsage-based billing; Default request estimate: $0.3 USD (not a fixed price). Account-specific pricing and final settlement may differ.\n<!-- aisa-pricing:end -->",
        "operationId": "post_openai_websearch_search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "type": "string",
                    "description": "Your question or instruction, same format as the OpenAI Responses API `input`. A message array is also accepted.",
                    "example": "What are the three biggest AI announcements this week? Give one sentence each with sources."
                  },
                  "max_output_tokens": {
                    "type": "integer",
                    "description": "Optional cap on the number of tokens generated in the answer.",
                    "example": 1024
                  },
                  "instructions": {
                    "type": "string",
                    "description": "Optional high-level instructions to steer the answer's tone or format."
                  }
                }
              },
              "example": {
                "input": "What are the three biggest AI announcements this week? Give one sentence each with sources.",
                "max_output_tokens": 1024
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A standard OpenAI Responses object. `output[]` interleaves web_search_call items and the cited answer message; the number of web_search_call items is the billed search count.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "object": {
                      "type": "string",
                      "example": "response"
                    },
                    "status": {
                      "type": "string",
                      "example": "completed"
                    },
                    "output": {
                      "type": "array",
                      "description": "Ordered items: web_search_call (searches performed) and message (the cited answer).",
                      "items": {
                        "type": "object"
                      }
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "input_tokens": {
                          "type": "integer"
                        },
                        "output_tokens": {
                          "type": "integer"
                        },
                        "input_tokens_details": {
                          "type": "object",
                          "properties": {
                            "cached_tokens": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "OpenAI Web Search",
        "tags": [
          "websearch"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "mpp": false,
          "mpp_methods": [],
          "x402": true
        },
        "x-aisa-category": "search",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "response_components",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.3,
          "estimate_source": "profile_seed",
          "evidence_source": "response_body"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": true,
          "request_wins": false
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "bee52a3f0c8a",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "677e89cda539"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/v1/responses",
        "x-aisa-validation": "provider",
        "x-aisa-catalog-id": "openai-web-search",
        "x-aisa-runtime-operation": {
          "operation_id": "post_openai_websearch_search",
          "method": "ANY",
          "path": "/apis/v1/openai-websearch/search"
        },
        "x-aisa-source": {
          "kind": "manual",
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/websearch.json",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "content_hash": "sha256:2216c80c42a2a3f3c14365c1e05d8d8beedac01286ef5240b08b4b4219e490a3",
          "converter": "scripts/import_existing_contracts.py@1",
          "path_space": "public",
          "owner": "AIsa-team/docs",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "policy_revision": "sha256:a5c3ad6b8722c55296ff05c07a1c8bccf1650bd6d81e8ddd78d41a77af0aeeff"
        },
        "x-aisa-response-source": {
          "kind": "upstream_success_contract",
          "source": {
            "kind": "manual",
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/websearch.json",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "content_hash": "sha256:2216c80c42a2a3f3c14365c1e05d8d8beedac01286ef5240b08b4b4219e490a3",
            "converter": "scripts/import_existing_contracts.py@1",
            "path_space": "public",
            "owner": "AIsa-team/docs",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "policy_revision": "sha256:a5c3ad6b8722c55296ff05c07a1c8bccf1650bd6d81e8ddd78d41a77af0aeeff"
          },
          "content_hash": "sha256:2cacd0c9ff56180294d17e6500331c19bcf1d1dc541e585ed73b5c5fa8a7ca65"
        },
        "x-codeSamples": [
          {
            "lang": "text",
            "label": "Reference example",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request POST \\\n  --url https://api.aisa.one/apis/v1/openai-websearch/search \\\n  --header 'Authorization: Bearer <token>' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"input\": \"What are the three biggest AI announcements this week? Give one sentence each with sources.\",\n  \"max_output_tokens\": 1024\n}'"
          }
        ],
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/search/post_openai-websearch-search"
      }
    }
  }
}
