Docs
Embedding API

Embeddings API

Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

Official Guide
We provide this cost friendly API for high throughput scenarios, there's no rate limit 🚀! For more detailed API spec, see platform.openai.com/docs/api-reference/embeddings


Available models:

  1. text-embedding-ada-002
  2. text-embedding-3-small
  3. text-embedding-3-large

Pricing
The price of embeddings call is 10% of the price of OpenAI official website. Details: LLM API | PPU Quota | Endpoint Usage


POST

https://api.goapi.xyz/v1/embeddings

Creates an embedding vector representing the input text.

Parameters:

Header
NameTypeRequiredDescription
Authorizationstring✔️Bearer YOUR-GOAPI-KEY
Body
NameTypeRequiredDescription
modelstring✔️text-embedding-ada-002
inputstring✔️your text input
encoding_formatstring`float` or `base64`

Response Codes:

200: OK
Successful Response
400: Bad Request
The request format does not meet the requirements.
401: Unauthorized
The API key is incorrect
500: Internal Server Error
Service is experiencing an error

Request Example

curl https://api.goapi.xyz/v1/embeddings \
  -H "Authorization: Bearer $YOUR_GOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "The food was delicious and the waiter...",
    "model": "text-embedding-ada-002",
    "encoding_format": "float"
  }'