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

# Submit one Shop video or photo set

> Submit a TikTok Shop video or photo set. For video, provide media.prepared_video_id and optionally prepared_cover_id; provider_options requires product_id and product_title. For photos, provide media.file_ids and provider_options.post_type with the matching product_links or shop_link. Use snake_case throughout. timezone is required; omit schedule for immediate publishing or set schedule.at to Unix milliseconds, at least 60 seconds and no more than 30 days ahead. Save kind and task_id from the 202 response and poll GET /publishing/tasks/{kind}/{task_id}; acceptance is not publication. Reuse the same Idempotency-Key and body after a timeout. A changed body with the same key returns 409. See [Publishing request options](/guides/publishing#submit-a-video) for video and photo option fields.

TikTok Shop only. The key creator must remain a workspace member with current account access. Read requests: 120/minute/workspace; writes: 30/minute/workspace (configurable). Media preparation and new submissions require Pro or higher. Video submission uses your API wallet; photos, reads, media preparation and cancellation are free. See https://www.creatok.ai/app/api-platform/pricing for current prices. Accepted tasks continue after plan downgrade. Unknown results are not automatically resent or refunded.



## OpenAPI

````yaml /api-reference/openapi.json post /publishing/tasks
openapi: 3.1.0
info:
  title: CreatOK API
  version: 1.3.0
  description: >-
    Asynchronous media generation and TikTok Shop publishing API. Authenticate
    with a Bearer organization API key (cok_). Personal CLI/MCP keys are not
    accepted. Resource responses are returned directly, without a code/data
    envelope. Each response includes X-Request-Id.
servers:
  - url: https://api.creatok.ai/v1
security: []
paths:
  /publishing/tasks:
    post:
      summary: Submit one Shop video or photo set
      description: >-
        Submit a TikTok Shop video or photo set. For video, provide
        media.prepared_video_id and optionally prepared_cover_id;
        provider_options requires product_id and product_title. For photos,
        provide media.file_ids and provider_options.post_type with the matching
        product_links or shop_link. Use snake_case throughout. timezone is
        required; omit schedule for immediate publishing or set schedule.at to
        Unix milliseconds, at least 60 seconds and no more than 30 days ahead.
        Save kind and task_id from the 202 response and poll GET
        /publishing/tasks/{kind}/{task_id}; acceptance is not publication. Reuse
        the same Idempotency-Key and body after a timeout. A changed body with
        the same key returns 409. See [Publishing request
        options](/guides/publishing#submit-a-video) for video and photo option
        fields.


        TikTok Shop only. The key creator must remain a workspace member with
        current account access. Read requests: 120/minute/workspace; writes:
        30/minute/workspace (configurable). Media preparation and new
        submissions require Pro or higher. Video submission uses your API
        wallet; photos, reads, media preparation and cancellation are free. See
        https://www.creatok.ai/app/api-platform/pricing for current prices.
        Accepted tasks continue after plan downgrade. Unknown results are not
        automatically resent or refunded.
      operationId: submitPublishingTask
      parameters:
        - name: Idempotency-Key
          in: header
          schema:
            type: string
            minLength: 1
            maxLength: 255
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishingRequest'
            examples:
              video:
                value:
                  kind: tiktok_shop_video
                  connection_uid: conn_ts_0000000000000000000000
                  timezone: EST
                  media:
                    prepared_video_id: pm_11111111-1111-4111-8111-111111111111
                  provider_options:
                    product_id: YOUR_PRODUCT_ID
                    product_title: Everyday bag
                    title: A closer look
                    is_ai_generated: true
                    precheck_enabled: true
              photos:
                value:
                  kind: tiktok_shop_photo
                  connection_uid: conn_ts_0000000000000000000000
                  timezone: EST
                  media:
                    file_ids:
                      - file_22222222-2222-4222-8222-222222222222
                  provider_options:
                    post_type: LINK_TO_PRODUCT
                    product_links:
                      - product_id: YOUR_PRODUCT_ID
                        link_title: Everyday bag
                    title: Explore the details
      responses:
        '202':
          description: >-
            Accepted attempt or current original attempt on replay, including
            failed attempts. Debited and refunded amounts reflect booked
            transactions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishingTask'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              description: Polling suggestion for nonterminal tasks
              schema:
                type: integer
        '400':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '401':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '402':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '403':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '404':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '409':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '429':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '500':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '502':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
        '503':
          description: >-
            Request error. Recover ambiguous accepted requests using the
            original idempotency key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
      security:
        - ApiKey: []
components:
  schemas:
    PublishingRequest:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        kind:
          type: string
          enum:
            - tiktok_shop_video
            - tiktok_shop_photo
        connection_uid:
          type: string
          minLength: 1
        timezone:
          type: string
          enum:
            - GMT+8
            - EST
            - PST
            - BRT
            - CST
            - UK
            - CET
            - ICT
            - WIB
            - WITA
            - WIT
            - MYT
            - PHT
            - SGT
            - JST
        schedule:
          type: object
          properties:
            at:
              type: integer
              exclusiveMinimum: 0
              maximum: 9007199254740991
          required:
            - at
          additionalProperties: false
        media:
          type: object
          properties:
            prepared_video_id:
              type: string
              pattern: ^pm_[0-9a-f-]{36}$
            prepared_cover_id:
              type: string
              pattern: ^pm_[0-9a-f-]{36}$
            file_ids:
              minItems: 1
              maxItems: 35
              type: array
              items:
                type: string
                pattern: >-
                  ^file_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          additionalProperties: false
        provider_options:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - kind
        - connection_uid
        - timezone
        - media
        - provider_options
      additionalProperties: false
    PublishingTask:
      type: object
      required:
        - task_id
        - publish_job_id
        - kind
        - connection_uid
        - client_source
        - status
        - created_at
        - cost
      properties:
        task_id:
          type: string
        publish_job_id:
          type:
            - string
            - 'null'
        kind:
          enum:
            - tiktok_shop_video
            - tiktok_shop_photo
        connection_uid:
          type: string
        client_source:
          type:
            - string
            - 'null'
        status:
          enum:
            - queued
            - scheduled
            - running
            - succeeded
            - failed
            - unknown
            - canceled
        raw_status:
          type: string
        created_at:
          type: integer
        schedule_time:
          type:
            - integer
            - 'null'
        completed_at:
          type:
            - integer
            - 'null'
        result:
          type: object
          properties:
            content_ids:
              type: array
              items:
                type: string
            content_urls:
              type: array
              items:
                type: string
        error:
          type:
            - object
            - 'null'
        cost:
          type: object
          required:
            - amount_usd
            - refunded_usd
          properties:
            amount_usd:
              type: string
              description: Booked charges in USD, with six decimal places.
            refunded_usd:
              type: string
              description: Booked refunds in USD, with six decimal places.
    Error:
      $schema: https://json-schema.org/draft/2020-12/schema
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - request_id
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: CreatOK organization API key

````

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