Skip to main content
POST
/
api
/
v1
/
client
/
txt2embedding
/
price-calculation
cURL
curl --request POST \
  --url https://api.deapi.ai/api/v1/client/txt2embedding/price-calculation \
  --header 'Accept: <accept>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "This is a sample text for embedding generation.",
  "model": "Bge_M3_FP16"
}
'
{
  "data": {
    "price": 0.0003
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept
enum<string>
default:application/json
required
Available options:
application/json

Body

application/json

Text to embedding conversion parameters

input
required

Input text(s) to generate embeddings for. Can be a single string or array of strings (max 2048 items). Each input limited to 8192 tokens, total request limited to 300k tokens.

Example:

"This is a sample text for embedding generation."

model
string
required

The embedding model to use. Available models can be retrieved via the GET /api/v1/client/models endpoint.

Example:

"Bge_M3_FP16"

Response

Calculated price for txt2embedding inference.

data
object