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

# Generate Image URL

> Generate a shareable URL for an image

Generates a signed, shareable URL for an image. The URL can be used to access the image without authentication.

<CodeGroup>
  ```python Python theme={null}
  import videodb

  conn = videodb.connect(api_key="your_api_key")
  coll = conn.get_collection()

  image = coll.get_image("i-xyz789")
  signed_url = image.generate_url()
  print(f"Signed URL: {signed_url}")
  ```

  ```javascript Node.js theme={null}
  import { connect } from 'videodb';

  const conn = connect({ apiKey: 'your_api_key' });
  const coll = await conn.getCollection();

  const image = await coll.getImage('i-xyz789');
  const signedUrl = await image.generateUrl();
  console.log(`Signed URL: ${signedUrl}`);
  ```
</CodeGroup>

<Note>
  * Returns a signed URL string that can be shared publicly
  * Signed URLs provide temporary access without requiring authentication
  * URLs expire after a certain period (check API documentation for expiration time)
  * Collection ID must be passed as a parameter with the request
</Note>

<CardGroup cols={2}>
  <Card title="Get Image Details" icon="image" href="/api-reference/images/get_image">
    Retrieve image information before generating URL
  </Card>

  <Card title="List Images" icon="list" href="/api-reference/images/list_images">
    Browse available images
  </Card>
</CardGroup>


## OpenAPI

````yaml POST /image/{image_id}/generate_url
openapi: 3.0.3
info:
  title: VideoDB Server API
  description: >
    VideoDB Server API for video, audio, and image processing with AI
    capabilities.

    This API provides comprehensive video management, search, indexing, and
    AI-powered features.
  version: 1.0.0
  contact:
    name: VideoDB Support
    url: https://videodb.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.videodb.io
    description: Production server
  - url: https://staging-api.videodb.io
    description: Staging server
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: User authentication and API key management
  - name: Collections
    description: Collection management operations
  - name: Videos
    description: Video upload, processing, and management
  - name: Audio
    description: Audio management operations
  - name: Images
    description: Image management operations
  - name: Search
    description: Content search and indexing
  - name: AI Generation
    description: AI-powered content generation
  - name: Billing
    description: Billing and usage management
  - name: RTStream
    description: Real-time streaming operations
  - name: Utilities
    description: Utility endpoints
  - name: Meeting
    description: Meeting recording and management
  - name: Capture
    description: Capture session management for recording streams
  - name: Editor
    description: Timeline editor operations
  - name: Transcode
    description: Media transcoding operations
  - name: Assets
    description: Cross-collection asset listing
paths:
  /image/{image_id}/generate_url:
    post:
      summary: Generate image URL
      parameters:
        - name: image_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^img-
            example: img-12345
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                format:
                  type: string
                  enum:
                    - jpg
                    - png
                    - webp
                  example: jpg
                quality:
                  type: integer
                  minimum: 1
                  maximum: 100
                  example: 90
                width:
                  type: integer
                  example: 1024
                height:
                  type: integer
                  example: 768
      responses:
        '200':
          description: Image URL generated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      image_url:
                        type: string
                        example: https://assets.videodb.io/img/12345.jpg
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: API key for authentication (sk-xxx format)

````