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

> ## Agent Instructions
> Public hosts only: console https://omnimux.ai/dashboard · API https://api.omnimux.ai · docs https://docs.omnimux.ai.
> Gateway auth is Authorization: Bearer sk-… on https://api.omnimux.ai/v1 (OpenAI-compatible Chat Completions and related paths).
> Discover pages from /llms.txt; full site dump /llms-full.txt; product skill /skill.md; docs search MCP /mcp. Prefer .md page URLs for Markdown.
> Default docs locale is en; zh mirrors the same relative paths. Do not invent model ids not present on live pricing or the complete API pages.

# 视频搜索

> 社交数据 · TikTok · `tiktok-search`

* 社交数据 **读取** 能力：OpenAI Chat Completions 形态，鉴权 `sk-`
* `model` 为 `tiktok-search`；`messages` 可传 dummy（如 `"."`）
* 业务参数放在请求体 **top-level**（如 `keyword`），不要塞进 system prompt
* 与 **社媒发布** 无关（发布见连接账户 / 帖子）

## 身份

| 字段    | 值               |
| ----- | --------------- |
| 系列    | 社交数据            |
| 平台    | TikTok          |
| 能力    | 视频搜索            |
| model | `tiktok-search` |

## 接口

| 方法     | 路径                     |
| ------ | ---------------------- |
| `POST` | `/v1/chat/completions` |

Base URL：`https://api.omnimux.ai`

## 鉴权

| 名称              | 位置     | 类型     | 必填 | 说明                       |
| --------------- | ------ | ------ | -- | ------------------------ |
| `Authorization` | header | string | 是  | `Bearer sk-...`（API Key） |

## 请求体

| 字段         | 类型     | 必填 | 说明                    |
| ---------- | ------ | -- | --------------------- |
| `model`    | string | 是  | 固定为 `tiktok-search`   |
| `messages` | array  | 是  | 可传 dummy user message |
| `keyword`  | string | 是  | 搜索关键词                 |

## 响应

### 200

| 字段                          | 类型     | 说明                     |
| --------------------------- | ------ | ---------------------- |
| `id`                        | string | 完成 id                  |
| `object`                    | string | `chat.completion`      |
| `model`                     | string | `tiktok-search`        |
| `choices[].message.content` | string | 上游平台 JSON 字符串（结构因接口而异） |

错误形态见右栏示例与 [错误码](/zh/faqs/connection-usage)。

<Panel>
  <RequestExample>
    ```bash cURL theme={null}
    curl --request POST \
      --url https://api.omnimux.ai/v1/chat/completions \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data '{
      "model": "tiktok-search",
      "messages": [
        { "role": "user", "content": "." }
      ],
      "keyword": "openai"
    }'
    ```
  </RequestExample>

  <ResponseExample>
    ```json 200 theme={null}
    {
      "id": "chatcmpl-social-data-example",
      "object": "chat.completion",
      "model": "tiktok-search",
      "choices": [
        {
          "index": 0,
          "message": {
            "role": "assistant",
            "content": "{ /* 上游平台 JSON，结构因接口而异 */ }"
          },
          "finish_reason": "stop"
        }
      ]
    }
    ```

    ```json 400 theme={null}
    {
      "error": {
        "message": "Invalid request: missing keyword or invalid parameter",
        "type": "invalid_request_error",
        "code": "bad_request"
      }
    }
    ```

    ```json 401 theme={null}
    {
      "error": {
        "message": "Invalid token or authentication failed",
        "type": "authentication_error",
        "code": "unauthorized"
      }
    }
    ```

    ```json 402 theme={null}
    {
      "error": {
        "message": "Insufficient quota. Please top up your account.",
        "type": "insufficient_quota",
        "code": "insufficient_quota"
      }
    }
    ```

    ```json 403 theme={null}
    {
      "error": {
        "message": "Model not allowed for this token",
        "type": "permission_error",
        "code": "forbidden"
      }
    }
    ```

    ```json 429 theme={null}
    {
      "error": {
        "message": "Rate limit exceeded",
        "type": "rate_limit_error",
        "code": "rate_limit_exceeded"
      }
    }
    ```

    ```json 500 theme={null}
    {
      "error": {
        "message": "Internal server error",
        "type": "server_error",
        "code": "internal_error"
      }
    }
    ```

    ```json 502 theme={null}
    {
      "error": {
        "message": "Upstream provider error",
        "type": "server_error",
        "code": "bad_gateway"
      }
    }
    ```
  </ResponseExample>
</Panel>
