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

# Create embedding

> Generate vector embeddings for one or more input texts.



## OpenAPI

````yaml post /v1/inference/embeddings
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.48.1
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/inference/embeddings:
    post:
      tags:
        - Inference
      summary: Create embeddings
      operationId: route_embeddings_v1_inference_embeddings_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingRequest'
            example:
              model: BAAI/bge-large-en-v1.5
              input:
                - The quick brown fox
                - jumps over the lazy dog
              encoding_format: float
        required: true
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
        '400':
          description: Malformed request body, or `model` missing.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '403':
          description: >-
            The requested model is not a base model and is not deployed for your
            team.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '422':
          description: Deployment not found, or the request is unprocessable.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '502':
          description: Backend disconnected before sending a response.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
        '503':
          description: No healthy backend available for the requested model.
          content:
            application/json:
              schema:
                oneOf:
                  - properties:
                      error:
                        properties:
                          message:
                            type: string
                          type:
                            type: string
                          code:
                            type: integer
                          param:
                            type: string
                            nullable: true
                        type: object
                        required:
                          - message
                    type: object
                    required:
                      - error
                    title: StructuredError
                  - properties:
                      error:
                        type: string
                    type: object
                    required:
                      - error
                    title: SimpleError
                title: ErrorResponse
      security:
        - APIKeyHeader: []
components:
  schemas:
    EmbeddingRequest:
      anyOf:
        - $ref: '#/components/schemas/EmbeddingCompletionRequest'
        - $ref: '#/components/schemas/EmbeddingChatRequest'
    EmbeddingResponse:
      additionalProperties: true
      properties:
        id:
          type: string
          title: Id
        object:
          type: string
          title: Object
          default: list
        created:
          type: integer
          title: Created
        model:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Model
        data:
          items:
            $ref: '#/components/schemas/EmbeddingResponseData'
          title: Data
          type: array
        usage:
          $ref: '#/components/schemas/UsageInfo'
      required:
        - id
        - created
        - data
        - usage
      title: EmbeddingResponse
      type: object
    EmbeddingCompletionRequest:
      additionalProperties: true
      properties:
        model:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Model
        user:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: User
        truncate_prompt_tokens:
          anyOf:
            - minimum: -1
              type: integer
            - type: 'null'
          default: null
          title: Truncate Prompt Tokens
        truncation_side:
          anyOf:
            - enum:
                - left
                - right
              type: string
            - type: 'null'
          default: null
          description: >-
            Which side to truncate from when truncate_prompt_tokens is active.
            'right' keeps the first N tokens. 'left' keeps the last N tokens.
          title: Truncation Side
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The request_id related to this request. If the caller does not set
            it, a random uuid will be generated.
          title: Request Id
        priority:
          default: 0
          description: >-
            The priority of the request (lower means earlier handling; default:
            0). Any priority other than 0 will raise an error if the served
            model does not use priority scheduling.
          title: Priority
          type: integer
        mm_processor_kwargs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Additional kwargs to pass to the HF processor.
          title: Mm Processor Kwargs
        cache_salt:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            If specified, the prefix cache will be salted with the provided
            string to prevent an attacker from guessing prompts in multi-user
            environments.
          title: Cache Salt
        input:
          anyOf:
            - items:
                type: integer
              type: array
            - items:
                items:
                  type: integer
                type: array
              type: array
            - type: string
            - items:
                type: string
              type: array
          title: Input
        add_special_tokens:
          default: true
          description: >-
            If true (the default), special tokens (e.g. BOS) will be added to
            the prompt.
          title: Add Special Tokens
          type: boolean
        encoding_format:
          default: float
          enum:
            - float
            - base64
            - bytes
            - bytes_only
          title: Encoding Format
          type: string
        embed_dtype:
          default: float32
          description: >-
            What dtype to use for encoding. Defaults to float32 for base64
            encoding to match the OpenAI python client behavior. Affects base64
            and binary responses only.
          enum:
            - float32
            - float16
            - bfloat16
            - fp8_e4m3
            - fp8_e5m2
          title: Embed Dtype
          type: string
        endianness:
          default: native
          description: >-
            What endianness to use for encoding. Defaults to native to match the
            OpenAI python client behavior. Affects base64 and binary responses
            only.
          enum:
            - native
            - big
            - little
          title: Endianness
          type: string
        dimensions:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Dimensions
        use_activation:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether to use activation for the pooler outputs. null uses the
            pooler's default, which is true in most cases.
          title: Use Activation
      required:
        - input
      title: EmbeddingCompletionRequest
      type: object
    EmbeddingChatRequest:
      additionalProperties: true
      description: Embeddings request that takes a chat conversation instead of `input`.
      properties:
        model:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Model
        user:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: User
        truncate_prompt_tokens:
          anyOf:
            - minimum: -1
              type: integer
            - type: 'null'
          default: null
          title: Truncate Prompt Tokens
        truncation_side:
          anyOf:
            - enum:
                - left
                - right
              type: string
            - type: 'null'
          default: null
          description: >-
            Which side to truncate from when truncate_prompt_tokens is active.
            'right' keeps the first N tokens. 'left' keeps the last N tokens.
          title: Truncation Side
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The request_id related to this request. If the caller does not set
            it, a random uuid will be generated.
          title: Request Id
        priority:
          default: 0
          description: >-
            The priority of the request (lower means earlier handling; default:
            0). Any priority other than 0 will raise an error if the served
            model does not use priority scheduling.
          title: Priority
          type: integer
        mm_processor_kwargs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Additional kwargs to pass to the HF processor.
          title: Mm Processor Kwargs
        cache_salt:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            If specified, the prefix cache will be salted with the provided
            string to prevent an attacker from guessing prompts in multi-user
            environments.
          title: Cache Salt
        messages:
          items:
            $ref: '#/components/schemas/ChatCompletionMessageParam'
          title: Messages
          type: array
        add_special_tokens:
          default: false
          title: Add Special Tokens
          type: boolean
        chat_template:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Chat Template
        chat_template_kwargs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Chat Template Kwargs
        encoding_format:
          default: float
          enum:
            - float
            - base64
            - bytes
            - bytes_only
          title: Encoding Format
          type: string
        embed_dtype:
          default: float32
          enum:
            - float32
            - float16
            - bfloat16
            - fp8_e4m3
            - fp8_e5m2
          title: Embed Dtype
          type: string
        endianness:
          default: native
          enum:
            - native
            - big
            - little
          title: Endianness
          type: string
        dimensions:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Dimensions
        use_activation:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Use Activation
      required:
        - messages
      title: EmbeddingChatRequest
      type: object
    EmbeddingResponseData:
      additionalProperties: true
      properties:
        index:
          type: integer
          title: Index
        object:
          default: embedding
          title: Object
          type: string
        embedding:
          anyOf:
            - items:
                type: number
              type: array
            - type: string
          description: >-
            The embedding vector, or a base64-encoded string when
            `encoding_format` is `base64`.
          title: Embedding
      required:
        - index
        - embedding
      title: EmbeddingResponseData
      type: object
    UsageInfo:
      additionalProperties: true
      properties:
        prompt_tokens:
          default: 0
          title: Prompt Tokens
          type: integer
        total_tokens:
          default: 0
          title: Total Tokens
          type: integer
        completion_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Completion Tokens
        prompt_tokens_details:
          anyOf:
            - $ref: '#/components/schemas/PromptTokenUsageInfo'
            - type: 'null'
          default: null
      title: UsageInfo
      type: object
    ChatCompletionMessageParam:
      additionalProperties: true
      description: >-
        A single chat message.


        Simplified projection of vLLM's `ChatCompletionMessageParam` union.
        Extra

        fields are permitted, so anything the upstream engine accepts still
        passes

        through -- this shape exists to keep the rendered schema readable.
      properties:
        role:
          enum:
            - system
            - developer
            - user
            - assistant
            - tool
          title: Role
          type: string
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ContentPartText'
                  - $ref: '#/components/schemas/ContentPartImage'
                  - $ref: '#/components/schemas/ContentPartAudio'
                  - $ref: '#/components/schemas/ContentPartVideo'
              type: array
            - type: 'null'
          default: null
          title: Content
        name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Name
        tool_calls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolCall'
              type: array
            - type: 'null'
          default: null
          title: Tool Calls
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Tool Call Id
      required:
        - role
      title: ChatCompletionMessageParam
      type: object
    PromptTokenUsageInfo:
      additionalProperties: true
      properties:
        cached_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Cached Tokens
        created_cache_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Created Cache Tokens
        multimodal_tokens:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          default: null
          description: >-
            Prompt tokens contributed by each input modality, keyed by modality
            name (e.g. `image`, `audio`, `video`). A breakdown of the multimodal
            placeholder tokens already counted in `prompt_tokens`; null when the
            request has no multimodal input.
          title: Multimodal Tokens
      title: PromptTokenUsageInfo
      type: object
    ContentPartText:
      additionalProperties: true
      properties:
        type:
          const: text
          default: text
          title: Type
          type: string
        text:
          title: Text
          type: string
      required:
        - text
      title: ContentPartText
      type: object
    ContentPartImage:
      additionalProperties: true
      properties:
        type:
          const: image_url
          default: image_url
          title: Type
          type: string
        image_url:
          $ref: '#/components/schemas/ImageURL'
      required:
        - image_url
      title: ContentPartImage
      type: object
    ContentPartAudio:
      additionalProperties: true
      properties:
        type:
          const: input_audio
          default: input_audio
          title: Type
          type: string
        input_audio:
          $ref: '#/components/schemas/InputAudio'
      required:
        - input_audio
      title: ContentPartAudio
      type: object
    ContentPartVideo:
      additionalProperties: true
      properties:
        type:
          const: video_url
          default: video_url
          title: Type
          type: string
        video_url:
          $ref: '#/components/schemas/VideoURL'
      required:
        - video_url
      title: ContentPartVideo
      type: object
    ToolCall:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: function
          title: Type
          default: function
        function:
          $ref: '#/components/schemas/FunctionCall'
      additionalProperties: true
      type: object
      required:
        - id
        - function
      title: ToolCall
    ImageURL:
      additionalProperties: true
      properties:
        url:
          description: Either an http(s) URL or a `data:image/...;base64,...` URI.
          title: Url
          type: string
        detail:
          anyOf:
            - enum:
                - auto
                - low
                - high
              type: string
            - type: 'null'
          default: auto
          title: Detail
      required:
        - url
      title: ImageURL
      type: object
    InputAudio:
      additionalProperties: true
      properties:
        data:
          description: Base64-encoded audio bytes.
          title: Data
          type: string
        format:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: e.g. `wav`, `mp3`.
          title: Format
      required:
        - data
      title: InputAudio
      type: object
    VideoURL:
      additionalProperties: true
      properties:
        url:
          title: Url
          type: string
      required:
        - url
      title: VideoURL
      type: object
    FunctionCall:
      properties:
        name:
          type: string
          title: Name
        arguments:
          type: string
          title: Arguments
      additionalProperties: true
      type: object
      required:
        - name
        - arguments
      title: FunctionCall
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Your Seekr API key, sent in the Authorization header with no 'Bearer'
        prefix.
      in: header
      name: Authorization

````

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