> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-bradley-turek-pfilter-operators-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Embeddings

> Generate text embeddings based on the given text input.



## OpenAPI

````yaml /openapi/product/AI-Services.yaml post /api/ai/v1/embedding/text
openapi: 3.1.0
info:
  title: AI Services
  description: >-
    Domo AI Services provide a consistent API to leverage Foundation Models to
    solve common problems such as natural language SQL generation (text-to-SQL),
    Summarization, Classification, Tool Calling and others.
  version: 2.3.3639_master
servers:
  - url: https://{subdomain}.domo.com
    variables:
      subdomain:
        description: The Domo instance subdomain.
        default: subdomain
security: []
tags:
  - name: AI Services - Classification
    description: Domo AI Service Classification APIs
  - name: AI Services - Data Extraction
    description: Domo AI Service Data Extraction APIs
  - name: AI Services - Embedding
    description: Domo AI Service Embedding APIs
  - name: AI Services - Image
    description: Domo AI Service Image APIs
  - name: AI Services - Messages
    description: Domo AI Service Messages APIs
  - name: AI Services - Sentiment Analysis
    description: Domo AI Service Sentiment Analysis APIs
  - name: AI Services - Text
    description: Domo AI Service Text APIs
paths:
  /api/ai/v1/embedding/text:
    post:
      tags:
        - AI Services - Embedding
      summary: Text Embeddings
      description: Generate text embeddings based on the given text input.
      operationId: embedText
      requestBody:
        description: Text Embedding AI Service request.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextEmbeddingAIRequest'
            examples:
              Basic Request:
                description: Basic text embedding request.
                value:
                  input:
                    - This is a sample text for generating embeddings.
              Specific Model Request:
                description: Text embedding request with specific model.
                value:
                  input:
                    - This is a sample text for generating embeddings.
                  model: domo.domo_ai.domo-embed-text-multilingual-v1:cohere
        required: true
      responses:
        '200':
          description: >-
            EmbeddingAIResponse The generated embeddings and model token usage
            information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingAIResponse'
              examples:
                Embedding Response:
                  description: Embedding Response
                  value:
                    embeddings:
                      - - 0.1
                        - 0.2
                        - 0.3
                        - 0.4
                        - 0.5
                    modelId: domo.domo_ai.domo-embed-text-multilingual-v1:cohere
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                type: string
        '409':
          description: Conflict
      security:
        - domo-developer-token: []
components:
  schemas:
    TextEmbeddingAIRequest:
      type: object
      description: |-
        <p>
         Text Embedding AI Service Request.
         </p>
      properties:
        input:
          type: array
          description: The input text to embed.
          items:
            type: string
        model:
          type: string
          description: >-
            The ID of the model to use for Text Embedding. The specified model
            must be configured for the Text Embedding AI Service by
                          an Admin.
        dimensions:
          type: integer
          format: int32
        modelConfiguration:
          type: object
          additionalProperties: {}
          description: Additional model-specific configuration parameter key-value pairs.
        requestId:
          type: string
          format: uuid
    EmbeddingAIResponse:
      type: object
      properties:
        embeddings:
          type: array
          items:
            type: array
            items:
              type: number
              format: double
        modelId:
          type: string
        modelProviderUsage:
          $ref: '#/components/schemas/ModelProviderUsage'
    ModelProviderUsage:
      type: object
      properties:
        inputTokens:
          type: integer
          format: int64
        outputTokens:
          type: integer
          format: int64
        totalTokens:
          type: integer
          format: int64
        reasoningTokens:
          type: integer
          format: int64
  securitySchemes:
    domo-developer-token:
      type: apiKey
      name: X-DOMO-Developer-Token
      in: header

````