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

# Generate embedding for text

> Generates embeddings for text in the same latent space as video, so that it is possible to perform text-to-video searches by embedding the text and comparing it to the video embeddings.



## OpenAPI

````yaml post /text/embed
openapi: 3.1.0
info:
  title: tl;dw
  version: 0.0.1
  x-logo:
    url: https://app.trytldw.ai/static/images/sidebar_logo.svg
    backgroundColor: transparent
    altText: tl;dw Logo
  contact:
    name: tl;dw Support
    url: https://app.trytldw.ai/support
  termsOfService: https://app.trytldw.ai/terms
  x-apisguru-categories:
    - video
    - ai
servers:
  - url: https://api.trytldw.ai/v1
security: []
tags:
  - name: Collection
    description: Collection
  - name: Video
    description: Media
  - name: Account
    description: Account
paths:
  /text/embed:
    post:
      tags:
        - Generate Text Embedding
      summary: Generate embedding for text
      description: >-
        Generates embeddings for text in the same latent space as video, so that
        it is possible to perform text-to-video searches by embedding the text
        and comparing it to the video embeddings.
      operationId: embed_text_text_embed_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedTextRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbedTextResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    EmbedTextRequest:
      properties:
        text:
          type: string
          title: Text
          description: The text to embed. Max length 300 characters
          examples:
            - People walking on the street
      type: object
      required:
        - text
      title: EmbedTextRequest
    EmbedTextResponse:
      properties:
        embedding:
          items:
            type: number
          type: array
          title: Embedding
          description: The embedding of the text, a list of 512 floats
      type: object
      required:
        - embedding
      title: EmbedTextResponse
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````