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

# Fill a shot's picture

> Solara AI API: Gives a shot a new picture, found or made by Solara. A paid edit, capped per day: send an `Idempotency-Key`. A pending answer is followed with Get a fill. With `clip: true`, an AI clip for a shot that plays one, made by `model` (else the video's `clip_model`), never another: 10 a video a UTC day and 60 a workspace a month (429 `clip_limit`), on a paid plan only (402 `ai_clips_plan_required`).

Permission: **Edit** (`edit`).



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/projects/{id}/items/{itemId}/fill
openapi: 3.1.0
info:
  title: Solara AI API
  version: '1'
  description: >-
    Make and edit videos with an API key. Every operation here accepts a key;
    everything else in Solara is for people in the app. Generated from the
    backend by tools/docs/build-public-spec.ts.
servers:
  - url: https://api.solaraai.com
    description: Production
security:
  - ApiKeyBearer: []
tags:
  - name: Styles
    description: The looks a video can be made in.
  - name: Upload
    description: Send a recording to Solara in parts.
  - name: Footage
    description: >-
      The person's own photos and clips, shown as b-roll on the lines that
      mention them. Add each one after the recording's upload and before Create
      a video: footage added after the video is made isn't placed in it.
  - name: Videos
    description: Make a video from an upload and follow it.
  - name: Editing
    description: Read and change an edit. Editing is free and never renders.
  - name: Export
    description: >-
      Render the final video and download it. An export uses one of the plan's
      videos.
  - name: Calendar
    description: >-
      What posts when, how each post went, and what is ready to post. Read only:
      moving, retrying or deleting a post is the person's, in Solara.
  - name: Performance
    description: >-
      How the workspace's posts are doing: each platform's own numbers, read on
      a schedule, never live. YouTube's and Threads' numbers are not shared with
      an API key; X's come with a plan; LinkedIn isn't measured yet.
  - name: Posting
    description: >-
      Ask the person to approve a post: they approve in Solara, and nothing
      posts before. Needs the Ask to post permission, which an AI agent gets
      when the person allows it; keys made in the app do not have it.
paths:
  /api/v1/projects/{id}/items/{itemId}/fill:
    post:
      tags:
        - Editing
      summary: Fill a shot's picture
      description: >-
        Gives a shot a new picture, found or made by Solara. A paid edit, capped
        per day: send an `Idempotency-Key`. A pending answer is followed with
        Get a fill. With `clip: true`, an AI clip for a shot that plays one,
        made by `model` (else the video's `clip_model`), never another: 10 a
        video a UTC day and 60 a workspace a month (429 `clip_limit`), on a paid
        plan only (402 `ai_clips_plan_required`).


        Permission: **Edit** (`edit`).
      operationId: fill-project-shot
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - description: The shot's id, or a picture block's (an added item's id, u…)
          in: path
          name: itemId
          required: true
          schema:
            description: The shot's id, or a picture block's (an added item's id, u…)
            maxLength: 128
            minLength: 1
            type: string
        - description: The same key answers the first fill and costs nothing
          in: header
          name: Idempotency-Key
          required: true
          schema:
            description: The same key answers the first fill and costs nothing
            maxLength: 128
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FillShotInputBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FillBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - ApiKeyBearer: []
components:
  schemas:
    FillShotInputBody:
      additionalProperties: false
      type: object
      properties:
        async:
          description: >-
            Answer at once with status pending while a picture is generated;
            poll get-project-shot-fill. Without it the call waits for the
            picture.
          type: boolean
        clip:
          description: >-
            An AI clip for the shot's one media slot (media_slots) instead of a
            picture, always answered pending: poll get-project-shot-fill. It
            animates the shot's picture (a stock photo or a generated one) or,
            with query, is made from the words. Counts 1 toward the AI clips'
            caps (429 clip_limit); one its model turns down at once is free, at
            most 10 a video a UTC day (then 429 clip_refusal_limit); 422
            ai_clips_off while the workspace has none; 402
            ai_clips_plan_required while its plan has none (a free workspace: AI
            clips come with a paid plan; source stock still works). A clip that
            fails ends with clip_failure: no other model is tried
          type: boolean
        from:
          description: >-
            With clip: the asset id of the picture to animate (a stock photo or
            a generated picture of this video). Default: the shot's picture
          maxLength: 128
          type: string
        media_slots:
          description: >-
            The picture slots it lacks (needsFill.media); ["picture"] for a
            picture block
          items:
            type: string
          maxItems: 6
          type:
            - array
            - 'null'
        model:
          description: >-
            With clip: the model that makes it, shown with the clip. Default:
            the video's clip_model, else gemini-omni-flash
          enum:
            - gemini-omni-flash
            - minimax-h3-max
            - minimax-h3-max-turbo
          type: string
        next:
          description: 'Try another: the next stored picture, no model call, not counted'
          type: boolean
        query:
          description: >-
            The customer's own picture search (Ask AI); counted, and the model
            writes no search
          maxLength: 80
          type: string
        source:
          description: >-
            With clip: ai (the default) makes an AI clip; stock finds another
            stock clip on Pexels in the video's frame, one the shot has not
            shown, with no model call, answered at once and never counted (notes
            no-clip and no-stock when there is none). With stock, query is the
            search; model and from are refused
          enum:
            - stock
            - ai
          type: string
        span:
          $ref: '#/components/schemas/FillSpanBody'
          description: >-
            A picture block's span: required when itemId is a block's id (the
            block need not be saved yet), refused for any other item. The
            picture is found or made from the words said over it, in the video's
            frame, as a shot's picture is (stock or generated, judged), and
            counts as one picture fill (D5); 422 picture_blocks_off while the
            workspace has no picture blocks. A block takes no text slot, clip,
            model, from or source (422)
        text_slots:
          description: The text slots the shot lacks for it (needsFill.text)
          items:
            type: string
          maxItems: 6
          type:
            - array
            - 'null'
        variant:
          description: The look being tried; picture-block for a picture block
          maxLength: 64
          minLength: 1
          type: string
      required:
        - variant
    FillBody:
      additionalProperties: false
      type: object
      properties:
        assets:
          description: The pictures named, with signed URLs
          items:
            $ref: '#/components/schemas/FillAssetBody'
          type:
            - array
            - 'null'
        clip_failure:
          $ref: '#/components/schemas/ClipFailure'
          description: >-
            Why an AI clip did not land, and with which model (never switched):
            reason is model-failed, model-refused, model-unavailable, deadline,
            judge-rejected, finish-failed, source-missing or ai-clips-off;
            detail one sentence saying it; counted whether it still counts
            toward the AI clip caps (a provider may bill it). The shot keeps
            what it showed
        clips:
          $ref: '#/components/schemas/ClipCounts'
          description: >-
            An AI clip's fill: the video's AI clips today and the workspace's
            this month, against their caps
        id:
          description: >-
            The fill's id: poll get-project-shot-fill with it while status is
            pending
          type: string
        kind:
          description: clip for an AI clip's fill; absent for a picture's
          enum:
            - clip
          type: string
        limit:
          description: Fills a video may use per day
          format: int64
          type: integer
        media:
          additionalProperties:
            items:
              type: string
            type:
              - array
              - 'null'
          description: Asset ids per picture slot
          type: object
        notes:
          description: >-
            title-fallback: the titles are the shot's own words; no-picture: no
            picture landed; card: the shot shows its headline card, with why
            (no-stock, judge-rejected, provider-error, deadline,
            generation-limit); no-clip: an AI clip did not land, with why (as
            clip_failure.reason)
          items:
            type: string
          type:
            - array
            - 'null'
        source:
          description: >-
            How the picture is got: generate ("Making a picture…"), stock
            ("Finding a picture…") or card (the headline card)
          enum:
            - generate
            - stock
            - card
          type: string
        status:
          description: pending while the picture is being made (async fills only)
          enum:
            - done
            - pending
          type: string
        text:
          additionalProperties:
            type: string
          description: A title per text slot
          type: object
        used:
          description: Fills this video has used today (D5)
          format: int64
          type: integer
      required:
        - assets
        - used
        - limit
    ErrorModel:
      additionalProperties: false
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
          description: >-
            Names a customer-visible error, for the app to translate; absent on
            other errors
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
    FillSpanBody:
      additionalProperties: false
      type: object
      properties:
        end_ms:
          description: 'Where it ends, ms: at least 500 ms after start_ms'
          format: int64
          maximum: 3600000
          minimum: 0
          type: integer
        start_ms:
          description: >-
            Where the block starts on the plan's clock (the timeline's, before
            the speed), ms
          format: int64
          maximum: 3600000
          minimum: 0
          type: integer
      required:
        - start_ms
        - end_ms
    FillAssetBody:
      additionalProperties: false
      type: object
      properties:
        id:
          description: The asset id the edit document names (story override fill.media)
          type: string
        provenance:
          $ref: '#/components/schemas/PictureProvenance'
          description: >-
            How the picture was made: model, prompt, judge score and reason,
            cost, attempt
        source:
          description: generated, stock or upload
          type: string
        src:
          description: A signed URL for the preview; never stored in the document
          type: string
        type:
          enum:
            - image
            - video
          type: string
      required:
        - id
        - type
        - src
    ClipFailure:
      additionalProperties: false
      type: object
      properties:
        counted:
          type: boolean
        detail:
          type: string
        model:
          type: string
        reason:
          type: string
      required:
        - model
        - reason
        - counted
    ClipCounts:
      additionalProperties: false
      type: object
      properties:
        per_day:
          format: int64
          type: integer
        per_month:
          format: int64
          type: integer
        plan_required:
          description: >-
            The workspace's plan has no AI clips (a free workspace): none is
            allowed, and per_day and per_month are 0. Stock clips and pictures
            still work. Absent: a paid plan
          type: boolean
        used_month:
          format: int64
          type: integer
        used_today:
          format: int64
          type: integer
      required:
        - used_today
        - per_day
        - used_month
        - per_month
    ErrorCode:
      description: >-
        A stable name for a customer-visible error; the app translates it.
        Absent on other errors.
      enum:
        - invalid_credentials
        - invalid_or_expired
        - too_many_attempts
        - resend_too_soon
        - email_taken
        - invalid_phone
        - temporarily_unavailable
        - turnstile_failed
        - email_unchanged
        - phone_unchanged
        - account_deletion_unavailable
        - project_not_found
        - plan_changed
        - subscription_required
        - restyle_limit
        - fill_limit
        - export_limit
        - ask_limit
        - music_limit
        - music_unavailable
        - free_limit
        - plan_required
        - allowance_used
        - not_exported
        - not_editable
        - earlier_cut
        - invalid_edit
        - edit_timing_off
        - landscape_off
        - speaker_poster_off
        - reedit_off
        - music_off
        - animated_off
        - animated_locked
        - animation_pending
        - caption_style_unfit
        - animated_colors_fixed
        - animated_too_long
        - speed_too_slow
        - animated_allowance_used
        - animated_plan_required
        - redraw_limit
        - cap_workspace
        - cap_workspace_drawing
        - cap_global
        - attachment_video
        - attachment_too_big
        - attachment_missing
        - attachment_limit
        - attachment_too_long
        - ask_busy
        - plan_not_for_sale
        - not_entitled
        - plan_change_unavailable
        - not_for_sale
        - same_plan
        - resume_required
        - upgrade_pending
        - quote_expired
        - no_pending_upgrade
        - exit_offer_ended
        - campaign_offer_ended
        - post_publishing
        - post_already_ended
        - post_not_ended
        - post_preparing
        - post_not_retryable
        - post_needs_reconnect
        - post_may_be_live
        - text_post_needs_media
        - caption_required
        - caption_too_long
        - caption_ai_limit
        - caption_ai_no_source
        - caption_ai_failed
        - caption_ai_unavailable
        - caption_ai_no_room
        - caption_ai_listening
        - upload_words_limit
        - company_not_found
        - linkedin_needs_reconnect
        - youtube_off
        - youtube_not_short
        - youtube_too_large
        - scope_not_offered
        - x_off
        - x_video_refused
        - threads_off
        - threads_video_refused
        - pinterest_off
        - pinterest_video_refused
        - pinterest_business_account_needed
        - pinterest_needs_reconnect
        - google_business_off
        - google_business_needs_reconnect
        - google_business_video_refused
        - google_business_location_not_found
        - google_business_ended
        - bluesky_off
        - bluesky_video_refused
        - linkedin_page_off
        - linkedin_page_needs_reconnect
        - linkedin_page_not_found
        - facebook_video_refused
        - photo_unfittable
        - intake_not_found
        - intake_not_complete
        - intake_limit
        - intake_not_configured
        - intake_invalid
        - api_key_invalid
        - api_key_revoked
        - api_key_not_allowed
        - insufficient_scope
        - agent_api_off
        - agent_only
        - api_key_limit
        - api_key_daily_limit
        - idempotency_in_progress
        - idempotency_key_reused
        - publish_request_expired
        - publish_request_edited
        - publish_request_decided
        - publish_request_pending
        - video_not_postable
        - text_posts_waiting
        - publish_request_daily_limit
        - video_format_not_supported
        - photo_posts_waiting
        - upload_not_ready
        - tiktok_option_not_allowed
        - workspace_owner_only
        - oauth_off
        - oauth_request_expired
        - oauth_client_gone
        - oauth_device_code_unknown
        - oauth_request_not_yours
        - url_not_allowed
        - url_not_public
        - url_unreachable
        - not_a_video
        - video_too_large
        - video_too_long
        - url_fetches_busy
        - url_fetch_daily_limit
        - upload_incomplete
        - upload_used
        - broll_off
        - media_limit
        - media_daily_limit
        - media_too_large
        - media_too_long
        - media_not_supported
        - ai_clips_off
        - clip_limit
        - ai_clips_plan_required
        - clip_refusal_limit
        - stock_clip_limit
        - auto_edit_off
        - auto_edit_limit
        - auto_edit_locked
        - auto_edit_files_missing
        - auto_edit_busy
        - auto_edit_cutting
        - picture_blocks_off
        - picture_pending
        - block_too_long
        - footage_not_ready
        - block_is_clip
        - crop_size_unknown
        - no_speech
        - no_audio
        - feedback_unavailable
        - feedback_not_sent
        - feedback_rate_limited
        - duplicate_post
        - video_has_post
        - several_posts
        - post_in_old_format
        - x_same_text
        - youtube_already_posted
        - use_create_post
        - publish_requests_waiting
        - post_analytics_needs_plan
        - workspace_suspended
        - support_view_ended
        - support_view_read_only
      type: string
    ErrorDetail:
      additionalProperties: false
      type: object
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
    PictureProvenance:
      additionalProperties: false
      type: object
      properties:
        attempt:
          format: int64
          type: integer
        clipModel:
          type: string
        costUsd:
          format: double
          type: number
        credit:
          $ref: '#/components/schemas/Credit'
        from:
          type: string
        height:
          format: int64
          type: integer
        judgeReason:
          type: string
        judgeScore:
          format: int64
          type: integer
        key:
          type: string
        kind:
          type: string
        label:
          type: string
        model:
          type: string
        prompt:
          type: string
        query:
          type: string
        route:
          type: string
        seconds:
          format: int64
          type: integer
        tried:
          items:
            $ref: '#/components/schemas/PictureTry'
          type:
            - array
            - 'null'
        width:
          format: int64
          type: integer
      required:
        - route
        - costUsd
        - attempt
    Credit:
      additionalProperties: false
      type: object
      properties:
        author:
          type: string
        authorUrl:
          type: string
        pageUrl:
          type: string
        provider:
          type: string
      required:
        - provider
    PictureTry:
      additionalProperties: false
      type: object
      properties:
        costUsd:
          format: double
          type: number
        durationMs:
          format: int64
          type: integer
        error:
          type: string
        model:
          type: string
        reason:
          type: string
        score:
          format: int64
          type: integer
      required:
        - model
        - costUsd
        - durationMs
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: sol_live_
      description: >-
        An API key, created in Solara: the menu under your name, then API keys.
        Send it as `Authorization: Bearer sol_live_…`. It works while the
        workspace has agent access, within what its plan gives (the free plan
        included).

````

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