OpenAI
1. Overview
OpenAI's text embeddings measure the relevance between text strings and are commonly used in the following scenarios:
Search: Rank search results based on relevance to a query.
Clustering: Group similar text strings together.
Recommendations: Suggest items with related text content.
Anomaly Detection: Identify outlier text with low correlation to other data.
Diversity Measurement: Analyze the distribution of text similarity.
Classification: Categorize text based on the most similar labels.
Available model list:
text-embedding-3-small
text-embedding-3-large
text-embedding-ada-002
2. Request Description
Request method:
POST
Request address:
https://gateway.theturbo.ai/v1/audio/speech
3. Input Parameters
3.1 Header Parameters
Content-Type
string
Yes
Set the request header type, which must be application/json
application/json
Accept
string
Yes
Set the response type, which is recommended to be unified as application/json
application/json
Authorization
string
Yes
API_KEY required for authentication. Format: Bearer $YOUR_API_KEY
Bearer $YOUR_API_KEY
3.2 Body Parameters (application/json)
model
string
Yes
text-embedding-ada-002
input
string/array
Yes
Input content. The array dimension must not exceed 2048
, and the input token count must not exceed 8192
.
Hello, please tell me a joke.
encoding_format
string
No
Return vector format: supports float
and base64
.
float
4. Request Example
5. Response Example
Last updated