openapi: 3.1.0
info:
  title: Boldly with AI Studio API
  version: 0.1.0
  description: |
    Multi-model video and image generation API. Authenticate with a Bearer API key
    from your account console. Credits are drawn from the same balance as Film Studio.
servers:
  - url: https://www.boldlywithai.com
paths:
  /api/v1/jobs/createTask:
    post:
      summary: Create a generation job
      operationId: createTask
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [model, inputs]
              properties:
                model:
                  type: string
                  example: bytedance/seedance-2.0/image-to-video
                inputs:
                  type: object
                  properties:
                    prompt:
                      type: string
                    duration:
                      type: integer
                    outputResolution:
                      type: string
                      example: 720p
                    aspectRatio:
                      type: string
                      example: "16:9"
      responses:
        "202":
          description: |
            Job accepted. Body includes taskId and status (IN_QUEUE or COMPLETED for sync image jobs).
            Poll GET /api/v1/jobs/getTask?taskId=… until COMPLETED. Video models need inputs.image (https start frame).
        "401":
          description: Invalid or missing API key
  /api/v1/jobs/getTask:
    get:
      summary: Poll job status
      operationId: getTask
      security:
        - bearerAuth: []
      parameters:
        - name: taskId
          in: query
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Job status and result URL when complete
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
