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

# Embeddings Generation



## OpenAPI

````yaml POST /api/v1/ai/embeddings
openapi: 3.0.0
info:
  title: Orynt API
  description: API documentation for the Orynt x402 ai api wrapper
  version: '1.0'
  contact: {}
servers:
  - url: https://api.oryntai.xyz/
    description: Base URL
security: []
tags: []
paths:
  /api/v1/ai/embeddings:
    post:
      tags:
        - Ai
      summary: Generate embeddings from text
      operationId: AiController_embeddings
      parameters:
        - name: X-Network
          in: header
          required: true
          description: >-
            Blockchain network to use (e.g., solana, solana-devnet, base,
            polygon)
          schema:
            type: string
        - name: X-PAYMENT
          in: header
          required: false
          description: On-chain payment proof for HTTP 402 requests
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingDto'
      responses:
        '200':
          description: Embedding vector
          content:
            application/json:
              examples:
                embeddingExample:
                  summary: Example embedding response
                  value:
                    model: text-embedding-3-small
                    embedding:
                      - 0.01
                      - 0.05
                      - 0.23
                      - 0.56
        '402':
          description: Payment required (x402)
          content:
            application/json:
              examples:
                x402Example:
                  summary: Example 402 payment response
                  value:
                    x402Version: 1
                    error: X-PAYMENT header is required
                    accepts:
                      - scheme: exact
                        network: solana-devnet
                        maxAmountRequired: '40000'
                        resource: http://api.oryntai.xyz/api/v1/ai/embeddings
                        description: Generate embeddings
                        mimeType: ''
                        payTo: CEBAqJoQXomRdMubgTWL1fa99d2zr2rFTMPukk62fSUw
                        maxTimeoutSeconds: 60
                        asset: 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
                        outputSchema:
                          input:
                            type: http
                            method: POST
                            discoverable: true
                        extra:
                          feePayer: 2wKupLR9q6wXYppw8Gr2NvWxKBUqm4PPJKkQfoxHDBg4
components:
  schemas:
    EmbeddingDto:
      type: object
      properties:
        model:
          type: string
          description: Embedding model to use
          example: text-embedding-3-small
        text:
          type: string
          description: Text to embed
          example: Hello world
        options:
          type: object
          description: Provider-specific options
      required:
        - model
        - text

````