Skip to main content

Overview

Text embedding endpoints

Available Operations

Generate

Submits an embedding request to the embeddings router

Example Usage

Parameters

ParameterTypeRequiredDescription
ctxcontext.Context:heavy_check_mark:The context to use for the request.
requestoperations.CreateEmbeddingsRequest:heavy_check_mark:The request object to use for the request.
opts[]operations.Option:heavy_minus_sign:The options for this request.

Response

*operations.CreateEmbeddingsResponse, error

Errors

Error TypeStatus CodeContent Type
sdkerrors.BadRequestResponseError400application/json
sdkerrors.UnauthorizedResponseError401application/json
sdkerrors.PaymentRequiredResponseError402application/json
sdkerrors.NotFoundResponseError404application/json
sdkerrors.TooManyRequestsResponseError429application/json
sdkerrors.InternalServerResponseError500application/json
sdkerrors.BadGatewayResponseError502application/json
sdkerrors.ServiceUnavailableResponseError503application/json
sdkerrors.EdgeNetworkTimeoutResponseError524application/json
sdkerrors.ProviderOverloadedResponseError529application/json
sdkerrors.APIError4XX, 5XX*/*

ListModels

Returns a list of all available embeddings models and their properties

Example Usage

Parameters

ParameterTypeRequiredDescription
ctxcontext.Context:heavy_check_mark:The context to use for the request.
opts[]operations.Option:heavy_minus_sign:The options for this request.

Response

*components.ModelsListResponse, error

Errors

Error TypeStatus CodeContent Type
sdkerrors.BadRequestResponseError400application/json
sdkerrors.InternalServerResponseError500application/json
sdkerrors.APIError4XX, 5XX*/*