> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Alpha Search 专用接入

> 核对专用上游请求格式与透传响应的边界。

`POST /v1/alpha/search` 是专用上游接口，不是跨供应商统一搜索，也不是 Responses 的 `web_search` 工具。该路径仅对部分渠道类型开放；请管理员确认渠道支持，并配置可用上游和模型。

网关强制要求非空 `model`，保留其他原始 JSON 字段，模型映射时改写 `model`，渠道参数覆盖仍可能改变内容。源码没有定义稳定的 `query`、`results` 或引用结构；因此本站不编造通用请求体。此处只记录宿主已验证的契约，不是官方 OpenAI 公共 API 兼容声明。

按 [REST 运行环境](/zh/guides/http-runtime)配置，从部署方取得与上游版本一致的请求 JSON 文件后执行：

```bash theme={null}
export API_SEARCH_REQUEST_FILE="./search-request.json"
node examples/alpha-search.mjs
```

文件需包含 `model` 与部署要求的搜索字段。示例拒绝 `stream: true`，没有自动重试，仅验证 JSON 对象 HTTP 响应及常见错误信封。打印回执不表示搜索语义成功；需继续按供应商 schema 检查结果、引用和错误码。网关不会把响应包装成 Chat / Responses，成功上游的响应体和 Content-Type 直接返回，因此非 JSON 响应不适用本例。不要据此承诺 SSE、统一用量或免费搜索。见 [API 说明](/zh/api-reference/alpha-search)。

```javascript theme={null}
import { readFile } from 'node:fs/promises';
import { requestJSON } from './http-client.mjs';

try {
  // Use a request supplied for your deployment's upstream schema, not a guessed query field.
  const raw = await readFile(process.env.API_SEARCH_REQUEST_FILE);
  if (!raw.length || raw.length > 1024 * 1024) throw new Error('Invalid request size.');
  const body = JSON.parse(raw);
  if (!body || typeof body !== 'object' || Array.isArray(body)
    || typeof body.model !== 'string' || !body.model.trim() || body.stream === true) throw new Error('Invalid request.');
  await requestJSON('/v1/alpha/search', body);
  // A JSON receipt is not proof that the upstream search succeeded semantically.
  console.log('JSON response received. Validate results against the deployed upstream schema.');
} catch {
  console.error('Search request failed or returned a non-JSON/error response. No automatic retry.');
  process.exitCode = 1;
}
```

[Read in English](/en/guides/alpha-search)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.