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

# Create embeddings

> OpenAI-compatible embeddings. Returns vectors for models with embedding support; returns 404 model_not_found for models without embedding support. Preview vectors are returned while live models are not connected.



## OpenAPI

````yaml /openapi.json post /v1/embeddings
openapi: 3.1.0
info:
  title: Refuseless API
  version: 1.0.0
  description: >-
    OpenAI-compatible hosted inference for a named lineup of refusal-removed
    open weights.
servers:
  - url: https://api.refuseless.com
security:
  - bearerAuth: []
paths:
  /v1/embeddings:
    post:
      tags:
        - Embeddings
      summary: Create embeddings
      description: >-
        OpenAI-compatible embeddings. Returns vectors for models with embedding
        support; returns 404 model_not_found for models without embedding
        support. Preview vectors are returned while live models are not
        connected.
      operationId: createEmbedding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingRequest'
            example:
              model: glm-5.3-abliterated
              input: Write a tight system prompt.
      responses:
        '200':
          description: Embedding list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
        '400':
          description: Missing model or input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Unknown model, or no embedding support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: Gateway or model unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    EmbeddingRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          examples:
            - glm-5.3-abliterated
        input:
          description: String or array of strings to embed.
        encoding_format:
          type: string
          enum:
            - float
            - base64
        dimensions:
          type: integer
          description: Requested vector dimensions, where supported.
        user:
          type: string
      additionalProperties: true
    EmbeddingResponse:
      type: object
      required:
        - object
        - data
        - model
        - usage
      properties:
        object:
          type: string
          examples:
            - list
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                examples:
                  - 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
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - type
          properties:
            code:
              type: string
              examples:
                - invalid_key
                - insufficient_credits
                - model_not_found
                - model_busy
                - model_warming
                - upstream_error
                - model_unavailable
            message:
              type: string
            type:
              type: string
              examples:
                - api_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: YOUR_API_KEY

````

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