Invoke Large Model Service
POST/v1/ai/:provider/:path
When you need to pass an additional path when calling a large model, append the path parameter, for example chat/completions. Refer to the documentation of each large model for specific path definitions.
Streaming Output (server-sent events)
When streaming output is enabled, explicitly specify text/event-stream in the Accept request header; otherwise, the request will time out after 60 seconds.
Protocol Format
This API supports OpenAI Chat Completions, OpenAI Responses, and Anthropic-compatible protocols:
- When
pathischat/completions: use the OpenAI-compatible protocol. Both the request body and response body follow the OpenAI Chat Completions format. - When
pathisresponses: use the OpenAI Responses protocol. Both the request body and response body follow the OpenAI Responses API format. - When
pathisv1/messages: use the Anthropic protocol. Both the request body and response body follow the Anthropic Messages format.
Note that when using the Anthropic Messages API, the selected provider must have been configured for Anthropic protocol access.
The built-in providers that currently support both OpenAI and Anthropic protocols are:
cloudbasehunyuan-v3
The providers and models that currently support the OpenAI Responses protocol are:
- The
hy3-previewmodel under thecloudbasegroup - The
hy3-previewmodel under thehunyuan-v3group
Other providers and models do not support the Responses API.
Request
Responses
- 200
- 400
- 404
- default
Returned when the model call succeeds (the returned business result may still indicate an error)
Response Headers
Request ID
Request failed
Response Headers
Request ID
Request failed
Response Headers
Request ID
Common error information. For details, see https://docs.cloudbase.net/error-code/service
Response Headers
Request ID