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

# Create Video Personalization Share Link

> Creates a public link that plays a completed personalized video for 7 days.

## Sharing a Personalized Video

Once a run's `status` is `completed`, this endpoint returns a `share_url` anyone can open without an API key or a CAMB.AI account. It is how a personalized cut reaches the person it was made for: paste it into the email, the deal room or the onboarding ticket.

The link stays valid for 7 days. Calling the endpoint again within that time returns the same link instead of minting a new one, so it is safe to call on every render.

The response carries `share_url`, the link to hand out, and `share_token`, its identifier if you want to store or key on it.

> [!NOTE]
>
> The run must have finished. While it is still processing this endpoint returns **409**; poll [`/personalize-video/{task_id}`](get-personalize-video-status) until it reports `SUCCESS` and then retry.

## Request Example

```python Python SDK theme={null}
import os
from camb.client import CambAI

client = CambAI(api_key=os.environ["CAMB_API_KEY"])

share = client.personalize.share_video(12345)
print(share.share_url)
```

```typescript TypeScript SDK theme={null}
import { CambClient } from "@camb-ai/sdk";

const client = new CambClient({ apiKey: process.env.CAMB_API_KEY });

const share = await client.personalize.shareVideo({ run_id: 12345 });
console.log(share.share_url);
```

```python requests theme={null}
import os
import requests

response = requests.post(
    "https://client.camb.ai/apis/personalize-video-share/12345",
    headers={"x-api-key": os.environ["CAMB_API_KEY"]},
)
response.raise_for_status()
print(response.json()["share_url"])
```

```bash cURL theme={null}
curl -X POST "https://client.camb.ai/apis/personalize-video-share/12345" \
  -H "x-api-key: $CAMB_API_KEY"
```


## OpenAPI

````yaml post /personalize-video-share/{run_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /personalize-video-share/{run_id}:
    post:
      tags:
        - Apis
        - Video Personalization
      summary: Create Video Personalization Share Link
      description: >-
        Create a public link to a completed personalized video. The link is
        valid for 7 days; calling again within that time returns the same link.
      operationId: create_personalize_video_share_personalize_video_share__run_id__post
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/RunIDParam'
          description: The `run_id` of a completed personalization run.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalizeVideoShareOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RunIDParam:
      type: integer
      title: Run ID
      description: >-
        The unique identifier for the run, which was generated during the
        creation process and returned upon task completion.
    PersonalizeVideoShareOut:
      type: object
      title: PersonalizeVideoShareOut
      required:
        - share_token
        - share_url
      properties:
        share_token:
          type: string
          title: Share Token
          description: The 8-character token at the end of `share_url`.
        share_url:
          type: string
          title: Share Url
          description: Public link that plays the personalized video for 7 days.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        The `x-api-key` is a custom header required for authenticating requests
        to our API. Include this header in your request with the appropriate API
        key value to securely access our endpoints. You can find your API key(s)
        in the 'API' section of our studio website.

````

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