> ## 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.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Create Embeddings

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

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 API.

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

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

Served at the AIsa API path `/v1/embeddings` — OpenAI-compatible. Billing is token-based; the `usage.total_tokens` field reports the tokens billed for each request.

```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
```

## Request contract

* **Method and path:** POST /embeddings
* **Request URL template:** `https://api.aisa.one/v1/embeddings`

[Complete OpenAPI definition](https://aisa.one/docs/reference-contracts/jina.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "createEmbedding",
  "method": "POST",
  "path": "/embeddings",
  "servers": [
    {
      "url": "https://api.aisa.one/v1"
    }
  ],
  "parameters": [],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "example": {
          "input": "A fast, OpenAI-compatible embeddings endpoint.",
          "model": "jina-embeddings-v3"
        },
        "schema": {
          "properties": {
            "input": {
              "description": "A non-empty string, or an array of non-empty strings, to embed.",
              "example": "A fast, OpenAI-compatible embeddings endpoint.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "minItems": 1,
                  "type": "array"
                }
              ]
            },
            "model": {
              "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",
              "type": "string"
            }
          },
          "required": [
            "model",
            "input"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "bearerFormat": "API Key",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```


## OpenAPI

````yaml reference-contracts/jina.json POST /embeddings
openapi: 3.0.3
info:
  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 for both endpoints.
  title: Jina Embeddings & Rerank API
  version: 1.0.0
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.
      operationId: createEmbedding
      requestBody:
        content:
          application/json:
            example:
              input: A fast, OpenAI-compatible embeddings endpoint.
              model: jina-embeddings-v3
            schema:
              properties:
                input:
                  description: >-
                    A non-empty string, or an array of non-empty strings, to
                    embed.
                  example: A fast, OpenAI-compatible embeddings endpoint.
                  oneOf:
                    - type: string
                    - items:
                        type: string
                      minItems: 1
                      type: array
                model:
                  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
                  type: string
              required:
                - model
                - input
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - embedding:
                      - 0.0123
                      - -0.0456
                      - 0.0789
                    index: 0
                    object: embedding
                model: jina-embeddings-v3
                object: list
                usage:
                  total_tokens: 9
              schema:
                properties:
                  data:
                    items:
                      properties:
                        embedding:
                          description: 1024-dim embedding vector.
                          items:
                            format: float
                            type: number
                          type: array
                        index:
                          example: 0
                          type: integer
                        object:
                          example: embedding
                          type: string
                      type: object
                    type: array
                  model:
                    example: jina-embeddings-v3
                    type: string
                  object:
                    example: list
                    type: string
                  usage:
                    properties:
                      total_tokens:
                        example: 9
                        type: integer
                    type: object
                type: object
          description: Embedding list.
components:
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      scheme: bearer
      type: http

````

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