Request Types
/embeddings
Generate a new embedding.
POST
/
embeddings
Body
projectId
string
requiredThe Commonbase project ID.
input
string
requiredThe text used to generate an embedding.
userId
string
An optional custom string used to identify users in the invocation logs.
providerConfig
ProviderConfig
The embeddings provider configuration. Only OpenAI embeddings are supported.
Success Response
completed
boolean
Indicates whether the embedding is finished.
invocationId
string
The ID of the invocation.
projectId
string
The ID of the project.
type
'embeddings'
The type of the response. Always 'embeddings'
for this endpoint.
model
string
The name of the model used for the embedding.
data
object[]
The result of the embedding request. See response.data
in the OpenAI
Docs
Error Response
error
string
An error message explaining why the response failed.
invocationId
string
The ID of the invocation.