Class QianFanImageApi
java.lang.Object
org.springframework.ai.qianfan.api.auth.AuthApi
org.springframework.ai.qianfan.api.QianFanImageApi
QianFan Image API.
- Since:
- 1.0
- Author:
- Geng Rong
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static enum
QianFan Image API model.static final record
static final record
-
Field Summary
-
Constructor Summary
ConstructorDescriptionQianFanImageApi
(String apiKey, String secretKey) Create a new QianFan Image api with default base URL.QianFanImageApi
(String baseUrl, String apiKey, String secretKey, org.springframework.web.client.RestClient.Builder restClientBuilder) Create a new QianFan Image API with the provided base URL.QianFanImageApi
(String baseUrl, String apiKey, String secretKey, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) Create a new QianFan Image API with the provided base URL. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<QianFanImageApi.QianFanImageResponse>
createImage
(QianFanImageApi.QianFanImageRequest qianFanImageRequest) Methods inherited from class org.springframework.ai.qianfan.api.auth.AuthApi
getAccessToken
-
Field Details
-
DEFAULT_IMAGE_MODEL
-
-
Constructor Details
-
QianFanImageApi
Create a new QianFan Image api with default base URL.- Parameters:
apiKey
- QianFan api key.secretKey
- QianFan secret key.
-
QianFanImageApi
public QianFanImageApi(String baseUrl, String apiKey, String secretKey, org.springframework.web.client.RestClient.Builder restClientBuilder) Create a new QianFan Image API with the provided base URL.- Parameters:
baseUrl
- the base URL for the QianFan API.apiKey
- QianFan api key.secretKey
- QianFan secret key.restClientBuilder
- the rest client builder to use.
-
QianFanImageApi
public QianFanImageApi(String baseUrl, String apiKey, String secretKey, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler) Create a new QianFan Image API with the provided base URL.- Parameters:
baseUrl
- the base URL for the QianFan API.apiKey
- QianFan api key.secretKey
- QianFan secret key.restClientBuilder
- the rest client builder to use.responseErrorHandler
- the response error handler to use.
-
-
Method Details
-
createImage
public org.springframework.http.ResponseEntity<QianFanImageApi.QianFanImageResponse> createImage(QianFanImageApi.QianFanImageRequest qianFanImageRequest)
-