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

# Publish short video to YouTube Shorts, Instagram Reels, and/or TikTok



## OpenAPI

````yaml post /api/agent/shorts/publish
openapi: 3.1.0
info:
  title: Citedy Agent API
  version: 1.0.0
  description: >-
    Public contract for Citedy agent integrations. This contract reflects the
    current /api/agent surface without changing runtime behavior.
  contact:
    name: Citedy Support
    url: https://www.citedy.com
  license:
    name: Proprietary
    url: https://www.citedy.com
servers:
  - url: https://www.citedy.com
security: []
tags:
  - name: Health
    description: Platform and dependency health
  - name: Registration
    description: Agent onboarding and approval
  - name: Agent
    description: Agent identity and key lifecycle
  - name: Scout
    description: Trend scouting endpoints
  - name: Gaps
    description: Content gap analysis
  - name: Autopilot
    description: Article generation and retrieval
  - name: Articles
    description: Queued article generation job polling
  - name: Adaptations
    description: Social adaptation generation
  - name: Sessions
    description: Autopilot recurring sessions
  - name: Lead Magnets
    description: Lead magnet generation and state
  - name: Warm Leads
    description: Warm-lead report generation and export
  - name: Ingest
    description: Content ingestion jobs
  - name: Competitors
    description: Competitor discovery and analysis
  - name: Personas
    description: Writing persona catalog
  - name: Webhooks
    description: Webhook endpoint registration and delivery logs
  - name: Publishing
    description: Social publishing, scheduling and cancellation
  - name: Schedule
    description: Content schedule timeline and gap analysis
  - name: Settings
    description: Agent preferences and configuration
  - name: Scan
    description: Experimental trend scanning (xAI Grok)
  - name: Status
    description: Operational readiness and actionable onboarding status
  - name: Products
    description: Product knowledge base document management
  - name: Shorts
    description: Short-form video generation and polling
  - name: SEO Tools
    description: Agent-authenticated SEO diagnostics tools exposed via MCP seo.* namespace.
  - name: GSC
    description: Google Search Console integration and reporting
paths:
  /api/agent/shorts/publish:
    post:
      tags:
        - Shorts
      summary: Publish short video to YouTube Shorts, Instagram Reels, and/or TikTok
      operationId: publishShortVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShortsPublishRequest'
      responses:
        '200':
          description: Publish completed (check per-platform results)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortsPublishResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - AgentApiKey: []
components:
  schemas:
    ShortsPublishRequest:
      type: object
      required:
        - video_url
        - speech_text
        - targets
      properties:
        video_url:
          type: string
          format: uri
          description: >-
            HTTPS URL of the video. Must be hosted on download.citedy.com (path
            must start with `/agent/shorts/` or `/agent/reels/`) or Supabase
            storage. The R2 prefix restriction ensures Meta's
            `facebookexternalhit` crawler can fetch the video via our
            `/media/shorts/...` proxy on www.citedy.com — direct R2 URLs are
            blocked by the bucket's default `Disallow: /` robots.txt and cause
            Instagram Reel publish to fail.
        speech_text:
          type: string
          minLength: 5
          maxLength: 2000
          description: Spoken text from the video for metadata generation
        targets:
          type: array
          items:
            $ref: '#/components/schemas/ShortsPublishTarget'
          minItems: 1
          maxItems: 3
          description: >-
            Platforms to publish to (max 3). Duplicate platforms are rejected by
            runtime validation.
        privacy_status:
          type: string
          enum:
            - public
            - unlisted
            - private
          description: >-
            Publish privacy. YouTube supports public/unlisted/private. TikTok
            uses tiktok_privacy_level from the account's current creator_info
            options; privacy_status=private remains a compatibility fallback for
            SELF_ONLY. Instagram Reels ignores this field.
        tiktok_privacy_level:
          type: string
          enum:
            - PUBLIC_TO_EVERYONE
            - FOLLOWER_OF_CREATOR
            - MUTUAL_FOLLOW_FRIENDS
            - SELF_ONLY
          description: >-
            TikTok-only visibility level selected from the account's current
            TikTok creator_info options.
        tiktok_title:
          type: string
          minLength: 1
          maxLength: 2200
          description: TikTok-only reviewed post title/caption.
        tiktok_disable_comment:
          type: boolean
          description: TikTok-only flag to disable comments for the post.
        tiktok_disable_duet:
          type: boolean
          description: TikTok-only flag to disable duets for the post.
        tiktok_disable_stitch:
          type: boolean
          description: TikTok-only flag to disable stitches for the post.
        tiktok_brand_content_toggle:
          type: boolean
          description: >-
            TikTok-only commercial disclosure flag for third-party branded
            content. Branded content cannot use SELF_ONLY visibility.
        tiktok_brand_organic_toggle:
          type: boolean
          description: >-
            TikTok-only commercial disclosure flag for content promoting the
            creator's own brand.
        tiktok_is_aigc:
          type: boolean
          description: TikTok-only flag indicating AI-generated content.
      allOf:
        - if:
            properties:
              targets:
                contains:
                  type: object
                  properties:
                    platform:
                      const: tiktok
                  required:
                    - platform
            required:
              - targets
          then:
            anyOf:
              - required:
                  - tiktok_title
                  - tiktok_privacy_level
              - properties:
                  privacy_status:
                    const: private
                required:
                  - tiktok_title
                  - privacy_status
      additionalProperties: false
    ShortsPublishResponse:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              platform:
                type: string
              ok:
                type: boolean
              post_id:
                type: string
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - message
                additionalProperties: false
        metadata_provider:
          type: string
          description: LLM provider used for metadata generation
        metadata_degraded:
          type: boolean
          description: True if AI metadata generation failed and static fallback was used
        timings:
          type: object
          properties:
            metadata_ms:
              type: number
            total_ms:
              type: number
          additionalProperties:
            type: number
        credits_charged:
          type: number
    ShortsPublishTarget:
      type: object
      required:
        - platform
        - account_id
      properties:
        platform:
          type: string
          enum:
            - youtube_shorts
            - instagram_reels
            - tiktok
        account_id:
          type: string
          format: uuid
          description: Connected social account ID
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
      additionalProperties: true
    PaymentRequiredResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            credits_required:
              type: number
            breakdown:
              type: object
              additionalProperties:
                type: number
            topup:
              type: object
              description: Recommended credit top-up package with billing URL
              properties:
                recommended_package_credits:
                  type: integer
                  description: Credits in the recommended package
                recommended_package_price_usd:
                  type: number
                  description: Price of the recommended package in USD
                topup_url:
                  type: string
                  format: uri
                  description: URL to billing page with package pre-selected
              required:
                - recommended_package_credits
                - recommended_package_price_usd
                - topup_url
          required:
            - credits_required
            - topup
          additionalProperties: true
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            retry_after:
              type: integer
          required:
            - retry_after
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PaymentRequired:
      description: Insufficient credits
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredResponse'
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AgentApiKey:
      type: http
      scheme: bearer
      description: Bearer citedy_agent_* key

````