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

# Create Embeddings

> Generate embedding vectors from text using Jina embeddings, served via the OpenAI-compatible AIsa relay.

Generate embedding vectors for one or more input strings. Pass a non-empty `input` string, or an array of strings for batch embedding. The request and response are OpenAI-compatible, so the OpenAI SDK works unchanged by pointing `base_url` at the AIsa relay.

**Available models** (both 1024-dim output):

* `jina-embeddings-v3`
* `jina-embeddings-v5-text-small`

Served via the AIsa relay path `/v1/embeddings` — OpenAI-compatible. Billing is token-based at **\$0.050 per 1M tokens**; the `usage.total_tokens` field reports the tokens billed for each request.

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.aisa.one/v1/embeddings \
    -H "Authorization: Bearer $AISA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "jina-embeddings-v3",
      "input": "A fast, OpenAI-compatible embeddings endpoint."
    }'
  ```

  ```bash curl (v5-text-small) theme={null}
  curl https://api.aisa.one/v1/embeddings \
    -H "Authorization: Bearer $AISA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "jina-embeddings-v5-text-small",
      "input": "A fast, OpenAI-compatible embeddings endpoint."
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(base_url="https://api.aisa.one/v1", api_key="sk-aisa-...")

  resp = client.embeddings.create(
      model="jina-embeddings-v5-text-small",  # or "jina-embeddings-v3"
      input="A fast, OpenAI-compatible embeddings endpoint.",
  )

  print(resp.data[0].embedding)  # 1024-dim vector
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/jina.json POST /embeddings
openapi: 3.0.3
info:
  title: Jina Embeddings & Rerank API
  version: 1.0.0
  description: >-
    Jina embeddings and reranking served via the AIsa relay (OpenAI-compatible)
    path. Includes text embeddings (jina-embeddings-v3 and
    jina-embeddings-v5-text-small, both 1024-dim) and document reranking
    (jina-reranker-v3). Billing is token-based at $0.050 per 1M tokens for both
    endpoints.
servers:
  - url: https://api.aisa.one/v1
security:
  - BearerAuth: []
tags:
  - name: Embeddings & Rerank
paths:
  /embeddings:
    post:
      summary: Create embeddings
      description: >-
        Generate embedding vectors for one or more input strings using
        jina-embeddings-v3 or jina-embeddings-v5-text-small (both 1024-dim
        output). OpenAI-compatible request and response. Served via the AIsa
        relay path /v1/embeddings. Billing is token-based at $0.050 per 1M
        tokens.
      operationId: createEmbedding
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: >-
                    Embedding model name. Available: jina-embeddings-v3 or
                    jina-embeddings-v5-text-small (both 1024-dim).
                  enum:
                    - jina-embeddings-v3
                    - jina-embeddings-v5-text-small
                  example: jina-embeddings-v3
                input:
                  description: >-
                    A non-empty string, or an array of non-empty strings, to
                    embed.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                      minItems: 1
                  example: A fast, OpenAI-compatible embeddings endpoint.
            example:
              model: jina-embeddings-v3
              input: A fast, OpenAI-compatible embeddings endpoint.
      responses:
        '200':
          description: Embedding list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                          example: embedding
                        index:
                          type: integer
                          example: 0
                        embedding:
                          type: array
                          description: 1024-dim embedding vector.
                          items:
                            type: number
                            format: float
                  model:
                    type: string
                    example: jina-embeddings-v3
                  usage:
                    type: object
                    properties:
                      total_tokens:
                        type: integer
                        example: 9
              example:
                object: list
                data:
                  - object: embedding
                    index: 0
                    embedding:
                      - 0.0123
                      - -0.0456
                      - 0.0789
                model: jina-embeddings-v3
                usage:
                  total_tokens: 9
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````