> ## 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.

# Start Connection

> Start Connection — explicit account source

Choose the source explicitly. tiktok\_direct only authorizes TikTok and fails when official configuration is unavailable; it never falls back. zernio remains Zernio even when official TikTok is enabled. Calling this endpoint starts an authorization flow.

`provider` is required: `tiktok_direct` or `zernio`. It constrains the operation and never rewrites the stored source. Missing or unknown values return 400 `invalid-provider`.

Use an OmniMux user access token and `New-Api-User`, not an `sk-` key. Inspect `success` as well as HTTP status; some upstream failures return HTTP 200 with `success:false`.


## OpenAPI

````yaml openapi/ops/publishing/start-connect.json POST /api/social/v1/connect
openapi: 3.1.0
info:
  title: OmniMux Publishing — Start Connection
  version: provider-isolation
servers:
  - url: https://omnimux.ai
security:
  - accessToken: []
    userId: []
paths:
  /api/social/v1/connect:
    post:
      summary: Start Connection
      operationId: startConnect
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                provider:
                  type: string
                  enum:
                    - tiktok_direct
                    - zernio
                  description: >-
                    Required expected source; never changes the stored account
                    or post provider.
                platform:
                  type: string
                  description: >-
                    tiktok_direct only accepts TikTok. zernio follows the
                    configured platform allowlist.
                redirect_url:
                  type: string
                  description: Allowed return URL; validated against gateway configuration.
              required:
                - provider
                - platform
            example:
              provider: zernio
              platform: tiktok
      responses:
        '200':
          description: >-
            Check success before reading data. Generic upstream errors may use
            HTTP 200 with success:false.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      success:
                        type: boolean
                        enum:
                          - true
                      data:
                        type: object
                        properties:
                          auth_url:
                            type: string
                            format: uri
                          platform:
                            type: string
                          provider:
                            type: string
                            enum:
                              - tiktok_direct
                              - zernio
                            description: >-
                              Required expected source; never changes the stored
                              account or post provider.
                            example: zernio
                        required:
                          - auth_url
                          - platform
                          - provider
                    required:
                      - success
                      - data
                  - type: object
                    properties:
                      success:
                        type: boolean
                        enum:
                          - false
                      message:
                        type: string
                      code:
                        type: string
                    required:
                      - success
                      - message
        '400':
          description: >-
            Missing/unknown provider or invalid request. invalid-provider
            identifies a missing or unknown source.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  code:
                    type: string
                required:
                  - success
                  - message
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  code:
                    type: string
                required:
                  - success
                  - message
        '402':
          description: >-
            Billing-related rejection where applicable; upstream failures may
            instead be wrapped as success:false.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  code:
                    type: string
                required:
                  - success
                  - message
        '403':
          description: Account ownership or access denied.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  code:
                    type: string
                required:
                  - success
                  - message
        '404':
          description: Account or post not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  code:
                    type: string
                required:
                  - success
                  - message
        '503':
          description: Requested provider is disabled or not configured.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  message:
                    type: string
                  code:
                    type: string
                required:
                  - success
                  - message
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request POST \
              --url "https://omnimux.ai/api/social/v1/connect" \
              --header 'Authorization: Bearer <user-access-token>' \
              --header 'New-Api-User: <user-id>' \
              --header 'Content-Type: application/json' \
              --data '{"provider":"zernio","platform":"tiktok"}'
components:
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: OmniMux user access token, not an sk- API key.
    userId:
      type: apiKey
      in: header
      name: New-Api-User
      description: Current authenticated user ID.

````