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

# Creates an embedding vector representing the input text.



## OpenAPI

````yaml /openapi/openai.json post /openai/embeddings
openapi: 3.0.0
info:
  title: OpenAI generation
  version: 1.0.0
  description: API reference for OpenAI generation on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /openai/embeddings:
    post:
      summary: Creates an embedding vector representing the input text.
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Openai Embeddings Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  enum:
                    - text-embedding-3-small
                    - text-embedding-3-large
                    - text-embedding-ada-002
                  description: Openai Embeddings Model
                input:
                  description: Openai Embeddings Input
                  type: string
                encoding_format:
                  type: string
                  description: Openai Embeddings Encoding Format
                  enum:
                    - float
                    - base64
                  default: float
                dimensions:
                  type: integer
                  minimum: 1
                  description: Openai Embeddings Dimensions
            example:
              model: text-embedding-3-small
              input: Hello!
      responses:
        '200':
          description: Openai Embeddings Response 200
          content:
            application/json:
              schema:
                type: object
                required:
                  - object
                  - data
                  - model
                  - usage
                  - created
                properties:
                  object:
                    type: string
                    enum:
                      - list
                    description: Openai Embeddings Response 200 Object
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - object
                        - index
                        - embedding
                      properties:
                        object:
                          type: string
                          enum:
                            - embedding
                        index:
                          type: integer
                        embedding:
                          description: Openai Embeddings Response 200 Data Embedding
                          oneOf:
                            - type: array
                              items:
                                type: number
                            - type: string
                              description: Openai Embeddings Response 200 Data Embedding 2
                  model:
                    type: string
                    description: Openai Embeddings Response 200 Model
                  usage:
                    type: object
                    required:
                      - prompt_tokens
                      - total_tokens
                    properties:
                      prompt_tokens:
                        type: integer
                      total_tokens:
                        type: integer
                  created:
                    type: integer
                    description: Openai Embeddings Response 200 Created
              examples:
                float_example:
                  summary: Float embeddings
                  value:
                    object: list
                    data:
                      - object: embedding
                        index: 0
                        embedding:
                          - 0.0023064255
                          - -0.009327292
                          - 0.015271
                          - 0.001234
                    model: text-embedding-3-small
                    usage:
                      prompt_tokens: 9
                      total_tokens: 9
                    created: 1714500000
                base64_example:
                  summary: Base64 embeddings
                  value:
                    object: list
                    data:
                      - object: embedding
                        index: 0
                        embedding: AAABQWJjMTIz...
                    model: text-embedding-3-large
                    usage:
                      prompt_tokens: 18
                      total_tokens: 18
                    created: 1714500000
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: token_mismatched
                        message: The specified token is not matched with API.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_mismatched
                            description: Openai Embeddings Response 400 Error Code
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Openai Embeddings Response 400 Error Message
                      trace_id:
                        type: string
                        description: Openai Embeddings Response 400 Trace Id
                  - type: object
                    example:
                      error:
                        code: api_not_implemented
                        message: The API is not implemented.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: api_not_implemented
                            description: Openai Embeddings Response 400 Error Code 2
                          message:
                            type: string
                            example: The API is not implemented.
                            description: Openai Embeddings Response 400 Error Message 2
                      trace_id:
                        type: string
                        description: Openai Embeddings Response 400 Trace Id 2
          description: Openai Embeddings Response 400
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: invalid_token
                        message: The specified token is invalid or wrong.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: invalid_token
                            description: Openai Embeddings Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Openai Embeddings Response 401 Error Message
                      trace_id:
                        type: string
                        description: Openai Embeddings Response 401 Trace Id
          description: Openai Embeddings Response 401
        '429':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: too_many_requests
                        message: You have exceeded the rate limit.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: too_many_requests
                            description: Openai Embeddings Response 429 Error Code
                          message:
                            type: string
                            example: You have exceeded the rate limit.
                            description: Openai Embeddings Response 429 Error Message
                      trace_id:
                        type: string
                        description: Openai Embeddings Response 429 Trace Id
          description: Openai Embeddings Response 429
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: api_error
                        message: Internal server error.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: api_error
                            description: Openai Embeddings Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Openai Embeddings Response 500 Error Message
                      trace_id:
                        type: string
                        description: Openai Embeddings Response 500 Trace Id
          description: Openai Embeddings Response 500
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````