Baidu Qianfan integration (AI). Imported from open-connector.
https://api.qianfan.com/models
/completions
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The Qianfan FIM model identifier to use. |
| prompt | string | optional | The non-empty prefix text that the model should continue from. |
| suffix | string | optional | The optional suffix text used for fill-in-the-middle completion. |
| max_tokens | integer | optional | The maximum number of tokens to generate. |
| temperature | number | optional | The sampling temperature for generation. |
| top_p | number | optional | The nucleus sampling threshold. |
| stop | array | optional | Up to four stop sequences that stop generation. |
| stream | boolean | optional | Whether to request a streaming response. This connector only accepts false or o… |
| stream_options | object | optional | Additional upstream-compatible request fields. |
| user_id | string | optional | The end-user identifier for tracing requests. |
/chat/completions
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The Qianfan model identifier to use. |
| messages | array | optional | The ordered conversation messages. |
| max_tokens | integer | optional | The maximum number of tokens to generate. |
| temperature | number | optional | The sampling temperature for generation. |
| top_p | number | optional | The nucleus sampling threshold. |
| frequency_penalty | number | optional | The frequency penalty applied to repeated tokens. |
| presence_penalty | number | optional | The presence penalty applied to newly introduced tokens. |
| stop | string | optional | — |
| stream | boolean | optional | Whether to request a streaming response. This connector only accepts false or o… |
| stream_options | object | optional | Additional upstream-compatible request fields. |
| response_format | object | optional | Additional upstream-compatible request fields. |
| tools | array | optional | The tools available to the model. |
| tool_choice | string | optional | How the model should choose tools. |
| user | string | optional | An end-user identifier for tracing and abuse monitoring. |
/ai_search/chat/completions
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The AI search model identifier to use. |
| messages | array | optional | The ordered conversation messages. |
| stream | boolean | optional | Whether to request a streaming response. This connector only accepts false or o… |
/embeddings
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The embedding model identifier. |
| input | string | optional | One or more input strings to embed. |
| encoding_format | string | optional | The output encoding format for embeddings. |
| dimensions | integer | optional | The target embedding dimension count. |
| user | string | optional | An end-user identifier for tracing and abuse monitoring. |
/rerank
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The rerank model identifier. |
| query | string | optional | The search query used to score the candidate documents. |
| documents | array | optional | The ordered candidate documents to rank. |
| top_n | integer | optional | The maximum number of ranked documents to return. |
| return_documents | boolean | optional | Whether to include the ranked document text in the response. |
| max_chunks_per_doc | integer | optional | The maximum number of chunks to evaluate per document. |
| user | string | optional | An end-user identifier for tracing and abuse monitoring. |
/images/generations
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The image model identifier to use. |
| prompt | string | optional | The prompt used to generate the image. |
| n | integer | optional | The number of images to generate. |
| seed | integer | optional | The random seed used for generation. |
| size | string | optional | The output image size, for example 1024x1024. |
| response_format | string | optional | The response format requested from the upstream API. |
/video/generations
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The video model identifier to use. |
| content | array | optional | The ordered content items for generation. |
| duration | integer | optional | The requested video duration in seconds. |
| prompt_extend | boolean | optional | Whether the upstream prompt extension feature should be enabled. |
| watermark | boolean | optional | Whether a watermark should be added. |
/video/generations
| Param | Type | Required | Description |
|---|---|---|---|
| task_id | string | required | The video task identifier. |
/video/generations
| Param | Type | Required | Description |
|---|---|---|---|
| task_id | string | required | The video task identifier. |
/video/generations/list
| Param | Type | Required | Description |
|---|---|---|---|
| page_num | integer | optional | The page number to fetch. |
| page_size | integer | optional | The number of tasks per page. |
| status | string | optional | Filter by task status. |
| task_ids | array | optional | Filter by task identifiers. |
| model_name | string | optional | Filter by model name. |
| start_time | string | optional | Filter tasks created after this time. |
| end_time | string | optional | Filter tasks created before this time. |
/files
| Param | Type | Required | Description |
|---|---|---|---|
| file | object | optional | The file uploaded through POST /api/files to send to Qianfan. |
| purpose | string | optional | The declared purpose of the uploaded file. |
/files
| Param | Type | Required | Description |
|---|---|---|---|
| after | string | optional | Return files after this file identifier. |
| limit | integer | optional | The maximum number of files to return. |
| order | string | optional | The order in which files should be returned. |
| purpose | string | optional | Filter by file purpose. |
/files/{input}/content
| Param | Type | Required | Description |
|---|---|---|---|
| file_id | string | required | The file identifier. |
| input | string | required | Path parameter: input |
/batches
| Param | Type | Required | Description |
|---|---|---|---|
| input_file_id | string | optional | The input file identifier used by the batch. |
| endpoint | string | optional | The endpoint executed for each batch item. |
| completion_window | string | optional | The completion window requested for the batch. |
| metadata | object | optional | Additional upstream-compatible request fields. |
| replace | boolean | optional | Whether an existing output should be replaced. |
/batches/{input}/cancel
| Param | Type | Required | Description |
|---|---|---|---|
| batch_id | string | required | The batch identifier. |
| input | string | required | Path parameter: input |
/batches/{input}
| Param | Type | Required | Description |
|---|---|---|---|
| batch_id | string | required | The batch identifier. |
| input | string | required | Path parameter: input |
/batches
| Param | Type | Required | Description |
|---|---|---|---|
| after | string | optional | Return batches after this batch identifier. |
| limit | integer | optional | The maximum number of batches to return. |
/responses
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | optional | The Qianfan model identifier to use. |
| input | string | optional | The text or structured input items sent to the model. |
| instructions | string | optional | An optional system instruction inserted before the input. |
| stream | boolean | optional | Whether to request a streaming response. This connector only accepts false or o… |
/responses/{input}
| Param | Type | Required | Description |
|---|---|---|---|
| response_id | string | required | The response identifier. |
| input | string | required | Path parameter: input |
/responses/{input}
| Param | Type | Required | Description |
|---|---|---|---|
| response_id | string | required | The response identifier. |
| input | string | required | Path parameter: input |
/responses/{input}/input_items
| Param | Type | Required | Description |
|---|---|---|---|
| response_id | string | required | The response identifier. |
| after | string | optional | Return items after this item identifier. |
| before | string | optional | Return items before this item identifier. |
| limit | integer | optional | The maximum number of items to return. |
| order | string | optional | The order in which input items should be returned. |
| input | string | required | Path parameter: input |