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

# Create text embeddings

> Convert text into high-dimensional vector embeddings for semantic search, RAG (Retrieval-Augmented Generation), and similarity analysis. Supports multiple model dimensions.




## OpenAPI

````yaml /api-reference/openapi.json post /v1/embeddings
openapi: 3.0.1
info:
  title: Rock API AI Model API
  version: 1.0.0
  description: OpenAI-compatible AI model API reference for Rock API.
servers:
  - url: https://rockapi.ai
security:
  - BearerAuth: []
tags:
  - name: List models
  - name: OpenAI format (Chat)
  - name: OpenAI format (Responses)
  - name: Image generation
  - name: Image generation/OpenAI-compatible format
  - name: Image generation/Qwen
  - name: Video generation
  - name: Video generation/Sora-compatible format
  - name: Video generation/Kling format
  - name: Video generation/Jimeng format
  - name: Claude format (Messages)
  - name: Gemini format
  - name: OpenAI format (Embeddings)
  - name: Text completions
  - name: OpenAI audio
  - name: Rerank
  - name: Moderations
  - name: Realtime
  - name: Not implemented
  - name: Not implemented/Fine-tunes
  - name: Not implemented/Files
paths:
  /v1/embeddings:
    post:
      tags:
        - OpenAI format (Embeddings)
      summary: Create text embeddings
      description: >
        Convert text into high-dimensional vector embeddings for semantic
        search, RAG (Retrieval-Augmented Generation), and similarity analysis.
        Supports multiple model dimensions.
      operationId: createEmbedding
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingRequest'
        required: true
      responses:
        '200':
          description: Embeddings created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    EmbeddingRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          example: text-embedding-ada-002
        input:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: Text to embed
        encoding_format:
          type: string
          enum:
            - float
            - base64
          default: float
        dimensions:
          type: integer
          description: Output embedding dimensions
    EmbeddingResponse:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                example: embedding
              index:
                type: integer
              embedding:
                type: array
                items:
                  type: number
        model:
          type: string
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            total_tokens:
              type: integer
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Authenticate with a Bearer Token.
        Format: `Authorization: Bearer sk-xxxxxx`

````