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

# Generate embeddings (deprecated)

> Deprecated compatibility proxy. New integrations should call https://openrouter.ai/api/v1/embeddings directly with the provisioned OpenRouter key.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/ai.yaml post /api/ai/embeddings
openapi: 3.0.3
info:
  title: Insforge AI API
  version: 1.0.0
  description: >-
    Model Gateway helper APIs for OpenRouter key provisioning, model discovery,
    and deprecated compatibility proxy routes
servers: []
security: []
paths:
  /api/ai/embeddings:
    post:
      tags:
        - Client
      summary: Generate embeddings (deprecated)
      description: >-
        Deprecated compatibility proxy. New integrations should call
        https://openrouter.ai/api/v1/embeddings directly with the provisioned
        OpenRouter key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
      responses:
        '200':
          description: Embeddings generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingsResponse'
        '400':
          description: Invalid request - missing model or input
        '401':
          description: Unauthorized
        '500':
          description: Failed to generate embeddings
      deprecated: true
      security:
        - bearerAuth: []
components:
  schemas:
    EmbeddingsRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Embedding model identifier
          example: google/gemini-embedding-001
        input:
          oneOf:
            - type: string
              description: Single text input to embed
            - type: array
              items:
                type: string
              description: Array of text inputs to embed
          example: Hello world
        encoding_format:
          type: string
          enum:
            - float
            - base64
          default: float
          description: >-
            The format to return the embeddings in. Can be either float or
            base64.
        dimensions:
          type: integer
          minimum: 0
          description: >-
            The number of dimensions the resulting output embeddings should
            have. Only supported in certain models.
    EmbeddingsResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
          description: Object type, always "list"
        data:
          type: array
          items:
            $ref: '#/components/schemas/EmbeddingObject'
        metadata:
          type: object
          properties:
            model:
              type: string
              description: The model used for embedding
              example: text-embedding-ada-002
            usage:
              $ref: '#/components/schemas/TokenUsage'
    EmbeddingObject:
      type: object
      properties:
        object:
          type: string
          enum:
            - embedding
          description: Object type, always "embedding"
        embedding:
          type: array
          items:
            type: number
          description: The embedding vector (array of floats)
        index:
          type: integer
          description: Index of this embedding in the input array
    TokenUsage:
      type: object
      properties:
        promptTokens:
          type: integer
        completionTokens:
          type: integer
        totalTokens:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````