{
  "service": "qianfan",
  "displayName": "Baidu Qianfan",
  "categories": [
    "AI"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "bce-v3/ALTAK-...",
      "description": "Baidu Qianfan API key used with the Authorization Bearer header. Create it in System Management > API Key: https://cloud.baidu.com/doc/qianfan/s/wmh8l6tnf"
    }
  ],
  "homepageUrl": "https://qianfan.cloud.baidu.com",
  "actions": [
    {
      "id": "qianfan.cancel_batch",
      "service": "qianfan",
      "name": "cancel_batch",
      "description": "Cancel a Baidu Qianfan batch prediction job by its identifier.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "minLength": 1,
            "description": "The batch identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "batch_id"
        ],
        "description": "The input payload for a batch lookup action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The batch identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "status": {
            "type": "string",
            "description": "The current batch status."
          },
          "endpoint": {
            "type": "string",
            "description": "The endpoint executed by the batch."
          },
          "input_file_id": {
            "type": "string",
            "description": "The input file identifier."
          },
          "output_file_id": {
            "type": "string",
            "description": "The output file identifier."
          },
          "error_file_id": {
            "type": "string",
            "description": "The error file identifier."
          },
          "completion_window": {
            "type": "string",
            "description": "The completion window requested for the batch."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional upstream-compatible request fields."
          }
        },
        "additionalProperties": true,
        "description": "A Qianfan batch object."
      }
    },
    {
      "id": "qianfan.cancel_video_generation_task",
      "service": "qianfan",
      "name": "cancel_video_generation_task",
      "description": "Cancel a Baidu Qianfan video generation task by its task identifier.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "minLength": 1,
            "description": "The video task identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "task_id"
        ],
        "description": "The input payload for a single video task action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The request identifier."
          },
          "task_id": {
            "type": "string",
            "description": "The video task identifier."
          },
          "model": {
            "type": "string",
            "description": "The video model identifier."
          },
          "status": {
            "type": "string",
            "description": "The current task status."
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A video generation content item."
            },
            "description": "The video task content items."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for a video generation task."
      }
    },
    {
      "id": "qianfan.create_ai_search_completion",
      "service": "qianfan",
      "name": "create_ai_search_completion",
      "description": "Create a non-streaming AI search chat completion with Baidu Qianfan.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The AI search model identifier to use."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "system",
                    "user",
                    "assistant",
                    "tool",
                    "developer"
                  ],
                  "description": "The role of the message author."
                },
                "content": {
                  "description": "The message content."
                },
                "name": {
                  "type": "string",
                  "description": "The optional participant name for the message."
                },
                "tool_call_id": {
                  "type": "string",
                  "description": "The identifier of the tool call that this tool message responds to."
                },
                "tool_calls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "A tool call requested by the model."
                  },
                  "description": "The tool calls requested by an assistant message."
                }
              },
              "additionalProperties": true,
              "description": "A message in a Qianfan chat-style request."
            },
            "description": "The ordered conversation messages.",
            "minItems": 1
          },
          "stream": {
            "type": "boolean",
            "description": "Whether to request a streaming response. This connector only accepts false or omission."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for the Qianfan AI search chat completion action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The upstream status code."
          },
          "message": {
            "type": "string",
            "description": "The upstream status message."
          },
          "request_Id": {
            "type": "string",
            "description": "The upstream request identifier."
          },
          "choices": {
            "type": "array",
            "items": {
              "description": "A generated AI search choice."
            },
            "description": "The generated AI search choices."
          },
          "references": {
            "type": "array",
            "items": {
              "description": "A search reference."
            },
            "description": "The search references returned by the API."
          },
          "entities": {
            "type": "array",
            "items": {
              "description": "A detected entity."
            },
            "description": "The detected entities returned by the API."
          },
          "followup_queries": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The follow-up queries returned by the API."
          },
          "usage": {
            "description": "Usage information for the AI search request."
          },
          "is_safe": {
            "type": "boolean",
            "description": "Whether the response passed safety checks."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for the Qianfan AI search chat completion action."
      }
    },
    {
      "id": "qianfan.create_air_image_generation",
      "service": "qianfan",
      "name": "create_air_image_generation",
      "description": "Generate images with the Baidu Qianfan MuseSteamer Air image endpoint.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The image model identifier to use."
          },
          "prompt": {
            "type": "string",
            "description": "The prompt used to generate the image."
          },
          "n": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of images to generate."
          },
          "seed": {
            "type": "integer",
            "description": "The random seed used for generation."
          },
          "size": {
            "type": "string",
            "description": "The output image size, for example 1024x1024."
          },
          "response_format": {
            "type": "string",
            "description": "The response format requested from the upstream API."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for an image generation action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The image generation identifier."
          },
          "created": {
            "type": "integer",
            "description": "The Unix timestamp when the image was created."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A generated image result item."
            },
            "description": "The generated image results."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for an image generation action."
      }
    },
    {
      "id": "qianfan.create_batch",
      "service": "qianfan",
      "name": "create_batch",
      "description": "Create a Baidu Qianfan batch prediction job from an uploaded input file.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "input_file_id": {
            "type": "string",
            "description": "The input file identifier used by the batch."
          },
          "endpoint": {
            "type": "string",
            "description": "The endpoint executed for each batch item."
          },
          "completion_window": {
            "type": "string",
            "description": "The completion window requested for the batch."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional upstream-compatible request fields."
          },
          "replace": {
            "type": "boolean",
            "description": "Whether an existing output should be replaced."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for creating a Qianfan batch."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The batch identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "status": {
            "type": "string",
            "description": "The current batch status."
          },
          "endpoint": {
            "type": "string",
            "description": "The endpoint executed by the batch."
          },
          "input_file_id": {
            "type": "string",
            "description": "The input file identifier."
          },
          "output_file_id": {
            "type": "string",
            "description": "The output file identifier."
          },
          "error_file_id": {
            "type": "string",
            "description": "The error file identifier."
          },
          "completion_window": {
            "type": "string",
            "description": "The completion window requested for the batch."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional upstream-compatible request fields."
          }
        },
        "additionalProperties": true,
        "description": "A Qianfan batch object."
      },
      "asyncLifecycle": {
        "startActionId": "qianfan.create_batch",
        "statusActionId": "qianfan.get_batch",
        "cancelActionId": "qianfan.cancel_batch"
      }
    },
    {
      "id": "qianfan.create_chat_completion",
      "service": "qianfan",
      "name": "create_chat_completion",
      "description": "Create a non-streaming OpenAI-compatible chat completion with Baidu Qianfan.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The Qianfan model identifier to use."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "system",
                    "user",
                    "assistant",
                    "tool",
                    "developer"
                  ],
                  "description": "The role of the message author."
                },
                "content": {
                  "description": "The message content."
                },
                "name": {
                  "type": "string",
                  "description": "The optional participant name for the message."
                },
                "tool_call_id": {
                  "type": "string",
                  "description": "The identifier of the tool call that this tool message responds to."
                },
                "tool_calls": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "A tool call requested by the model."
                  },
                  "description": "The tool calls requested by an assistant message."
                }
              },
              "additionalProperties": true,
              "description": "A message in a Qianfan chat-style request."
            },
            "description": "The ordered conversation messages.",
            "minItems": 1
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of tokens to generate."
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 2,
            "description": "The sampling temperature for generation."
          },
          "top_p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "The nucleus sampling threshold."
          },
          "frequency_penalty": {
            "type": "number",
            "minimum": -2,
            "maximum": 2,
            "description": "The frequency penalty applied to repeated tokens."
          },
          "presence_penalty": {
            "type": "number",
            "minimum": -2,
            "maximum": 2,
            "description": "The presence penalty applied to newly introduced tokens."
          },
          "stop": {
            "anyOf": [
              {
                "type": "string",
                "description": "A single stop sequence."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "description": "A list of stop sequences."
              }
            ]
          },
          "stream": {
            "type": "boolean",
            "description": "Whether to request a streaming response. This connector only accepts false or omission."
          },
          "stream_options": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional upstream-compatible request fields."
          },
          "response_format": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional upstream-compatible request fields."
          },
          "tools": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A tool available to the model."
            },
            "description": "The tools available to the model."
          },
          "tool_choice": {
            "description": "How the model should choose tools."
          },
          "user": {
            "type": "string",
            "description": "An end-user identifier for tracing and abuse monitoring."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for the Qianfan chat completion action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The completion identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "created": {
            "type": "integer",
            "description": "The Unix timestamp when the completion was created."
          },
          "model": {
            "type": "string",
            "description": "The model that generated the completion."
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A generated completion choice."
            },
            "description": "The completion choices."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "The number of completion tokens generated."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              },
              "input_tokens": {
                "type": "integer",
                "description": "The number of input tokens consumed."
              },
              "output_tokens": {
                "type": "integer",
                "description": "The number of output tokens generated."
              }
            },
            "additionalProperties": true,
            "description": "Token usage metadata returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for the chat completion action."
      }
    },
    {
      "id": "qianfan.create_completion",
      "service": "qianfan",
      "name": "create_completion",
      "description": "Create a non-streaming fill-in-the-middle completion with Baidu Qianfan.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The Qianfan FIM model identifier to use."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "The non-empty prefix text that the model should continue from."
          },
          "suffix": {
            "type": "string",
            "description": "The optional suffix text used for fill-in-the-middle completion."
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of tokens to generate."
          },
          "temperature": {
            "type": "number",
            "description": "The sampling temperature for generation."
          },
          "top_p": {
            "type": "number",
            "description": "The nucleus sampling threshold."
          },
          "stop": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Up to four stop sequences that stop generation.",
            "maxItems": 4
          },
          "stream": {
            "type": "boolean",
            "description": "Whether to request a streaming response. This connector only accepts false or omission."
          },
          "stream_options": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional upstream-compatible request fields."
          },
          "user_id": {
            "type": "string",
            "description": "The end-user identifier for tracing requests."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for the Qianfan completion action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The completion identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "created": {
            "type": "integer",
            "description": "The Unix timestamp when the completion was created."
          },
          "model": {
            "type": "string",
            "description": "The model that generated the completion."
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A generated completion choice."
            },
            "description": "The completion choices."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "The number of completion tokens generated."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              },
              "input_tokens": {
                "type": "integer",
                "description": "The number of input tokens consumed."
              },
              "output_tokens": {
                "type": "integer",
                "description": "The number of output tokens generated."
              }
            },
            "additionalProperties": true,
            "description": "Token usage metadata returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for a completion action."
      }
    },
    {
      "id": "qianfan.create_embeddings",
      "service": "qianfan",
      "name": "create_embeddings",
      "description": "Generate embedding vectors for one or more input strings with Baidu Qianfan.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The embedding model identifier."
          },
          "input": {
            "anyOf": [
              {
                "type": "string",
                "description": "A single input string to embed."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "description": "A list of input strings to embed."
              }
            ],
            "description": "One or more input strings to embed."
          },
          "encoding_format": {
            "type": "string",
            "description": "The output encoding format for embeddings."
          },
          "dimensions": {
            "type": "integer",
            "minimum": 1,
            "description": "The target embedding dimension count."
          },
          "user": {
            "type": "string",
            "description": "An end-user identifier for tracing and abuse monitoring."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for the embeddings action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The top-level object type."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A single embedding result item."
            },
            "description": "The list of embedding result items."
          },
          "model": {
            "type": "string",
            "description": "The embedding model used for the response."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "The number of completion tokens generated."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              },
              "input_tokens": {
                "type": "integer",
                "description": "The number of input tokens consumed."
              },
              "output_tokens": {
                "type": "integer",
                "description": "The number of output tokens generated."
              }
            },
            "additionalProperties": true,
            "description": "Token usage metadata returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for the embeddings action."
      }
    },
    {
      "id": "qianfan.create_image_generation",
      "service": "qianfan",
      "name": "create_image_generation",
      "description": "Generate images with the Baidu Qianfan general image generation endpoint.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The image model identifier to use."
          },
          "prompt": {
            "type": "string",
            "description": "The prompt used to generate the image."
          },
          "n": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of images to generate."
          },
          "seed": {
            "type": "integer",
            "description": "The random seed used for generation."
          },
          "size": {
            "type": "string",
            "description": "The output image size, for example 1024x1024."
          },
          "response_format": {
            "type": "string",
            "description": "The response format requested from the upstream API."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for an image generation action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The image generation identifier."
          },
          "created": {
            "type": "integer",
            "description": "The Unix timestamp when the image was created."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A generated image result item."
            },
            "description": "The generated image results."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for an image generation action."
      }
    },
    {
      "id": "qianfan.create_response",
      "service": "qianfan",
      "name": "create_response",
      "description": "Create a non-streaming stored response with the Baidu Qianfan responses API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The Qianfan model identifier to use."
          },
          "input": {
            "description": "The text or structured input items sent to the model."
          },
          "instructions": {
            "type": "string",
            "description": "An optional system instruction inserted before the input."
          },
          "stream": {
            "type": "boolean",
            "description": "Whether to request a streaming response. This connector only accepts false or omission."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for creating a Qianfan stored response."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The response identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "status": {
            "type": "string",
            "description": "The current response status."
          },
          "model": {
            "type": "string",
            "description": "The model that produced the response."
          },
          "output": {
            "type": "array",
            "items": {
              "description": "A response output item."
            },
            "description": "The response output items."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "The number of completion tokens generated."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              },
              "input_tokens": {
                "type": "integer",
                "description": "The number of input tokens consumed."
              },
              "output_tokens": {
                "type": "integer",
                "description": "The number of output tokens generated."
              }
            },
            "additionalProperties": true,
            "description": "Token usage metadata returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response object returned by the Qianfan responses API."
      }
    },
    {
      "id": "qianfan.create_video_generation_task",
      "service": "qianfan",
      "name": "create_video_generation_task",
      "description": "Create a Baidu Qianfan video generation task.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The video model identifier to use."
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A video generation content item."
            },
            "description": "The ordered content items for generation.",
            "minItems": 1
          },
          "duration": {
            "type": "integer",
            "minimum": 1,
            "description": "The requested video duration in seconds."
          },
          "prompt_extend": {
            "type": "boolean",
            "description": "Whether the upstream prompt extension feature should be enabled."
          },
          "watermark": {
            "type": "boolean",
            "description": "Whether a watermark should be added."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for creating a video generation task."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The request identifier."
          },
          "task_id": {
            "type": "string",
            "description": "The generated video task identifier."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for creating a video generation task."
      },
      "asyncLifecycle": {
        "startActionId": "qianfan.create_video_generation_task",
        "statusActionId": "qianfan.get_video_generation_task",
        "cancelActionId": "qianfan.cancel_video_generation_task"
      }
    },
    {
      "id": "qianfan.delete_response",
      "service": "qianfan",
      "name": "delete_response",
      "description": "Delete a previously stored Baidu Qianfan response by its identifier.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "response_id": {
            "type": "string",
            "minLength": 1,
            "description": "The response identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "response_id"
        ],
        "description": "The input payload for a response lookup action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The deleted response identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the response was deleted successfully."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for deleting a stored response."
      }
    },
    {
      "id": "qianfan.get_batch",
      "service": "qianfan",
      "name": "get_batch",
      "description": "Fetch a Baidu Qianfan batch prediction job by its identifier.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "minLength": 1,
            "description": "The batch identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "batch_id"
        ],
        "description": "The input payload for a batch lookup action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The batch identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "status": {
            "type": "string",
            "description": "The current batch status."
          },
          "endpoint": {
            "type": "string",
            "description": "The endpoint executed by the batch."
          },
          "input_file_id": {
            "type": "string",
            "description": "The input file identifier."
          },
          "output_file_id": {
            "type": "string",
            "description": "The output file identifier."
          },
          "error_file_id": {
            "type": "string",
            "description": "The error file identifier."
          },
          "completion_window": {
            "type": "string",
            "description": "The completion window requested for the batch."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Additional upstream-compatible request fields."
          }
        },
        "additionalProperties": true,
        "description": "A Qianfan batch object."
      }
    },
    {
      "id": "qianfan.get_file_content",
      "service": "qianfan",
      "name": "get_file_content",
      "description": "Fetch the raw content of a Baidu Qianfan file by its identifier.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "string",
            "minLength": 1,
            "description": "The file identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "file_id"
        ],
        "description": "The input payload for a file lookup action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "The raw file content returned by the API."
          },
          "content_type": {
            "type": "string",
            "description": "The response content type returned by the API."
          }
        },
        "additionalProperties": false,
        "required": [
          "content",
          "content_type"
        ],
        "description": "Action output."
      }
    },
    {
      "id": "qianfan.get_response",
      "service": "qianfan",
      "name": "get_response",
      "description": "Fetch a previously stored Baidu Qianfan response by its identifier.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "response_id": {
            "type": "string",
            "minLength": 1,
            "description": "The response identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "response_id"
        ],
        "description": "The input payload for a response lookup action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The response identifier."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "status": {
            "type": "string",
            "description": "The current response status."
          },
          "model": {
            "type": "string",
            "description": "The model that produced the response."
          },
          "output": {
            "type": "array",
            "items": {
              "description": "A response output item."
            },
            "description": "The response output items."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "The number of completion tokens generated."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              },
              "input_tokens": {
                "type": "integer",
                "description": "The number of input tokens consumed."
              },
              "output_tokens": {
                "type": "integer",
                "description": "The number of output tokens generated."
              }
            },
            "additionalProperties": true,
            "description": "Token usage metadata returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response object returned by the Qianfan responses API."
      }
    },
    {
      "id": "qianfan.get_video_generation_task",
      "service": "qianfan",
      "name": "get_video_generation_task",
      "description": "Fetch a Baidu Qianfan video generation task by its task identifier.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "minLength": 1,
            "description": "The video task identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "task_id"
        ],
        "description": "The input payload for a single video task action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The request identifier."
          },
          "task_id": {
            "type": "string",
            "description": "The video task identifier."
          },
          "model": {
            "type": "string",
            "description": "The video model identifier."
          },
          "status": {
            "type": "string",
            "description": "The current task status."
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A video generation content item."
            },
            "description": "The video task content items."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for a video generation task."
      }
    },
    {
      "id": "qianfan.list_batches",
      "service": "qianfan",
      "name": "list_batches",
      "description": "List Baidu Qianfan batch prediction jobs with optional pagination.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "after": {
            "type": "string",
            "description": "Return batches after this batch identifier."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of batches to return."
          }
        },
        "additionalProperties": false,
        "description": "Action input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The batch identifier."
                },
                "object": {
                  "type": "string",
                  "description": "The object type returned by the API."
                },
                "status": {
                  "type": "string",
                  "description": "The current batch status."
                },
                "endpoint": {
                  "type": "string",
                  "description": "The endpoint executed by the batch."
                },
                "input_file_id": {
                  "type": "string",
                  "description": "The input file identifier."
                },
                "output_file_id": {
                  "type": "string",
                  "description": "The output file identifier."
                },
                "error_file_id": {
                  "type": "string",
                  "description": "The error file identifier."
                },
                "completion_window": {
                  "type": "string",
                  "description": "The completion window requested for the batch."
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Additional upstream-compatible request fields."
                }
              },
              "additionalProperties": true,
              "description": "A Qianfan batch object."
            },
            "description": "The matching batch objects."
          },
          "first_id": {
            "type": "string",
            "description": "The first batch identifier in the page."
          },
          "last_id": {
            "type": "string",
            "description": "The last batch identifier in the page."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more batches are available."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for listing Qianfan batches."
      }
    },
    {
      "id": "qianfan.list_files",
      "service": "qianfan",
      "name": "list_files",
      "description": "List files stored in Baidu Qianfan with optional filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "after": {
            "type": "string",
            "description": "Return files after this file identifier."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of files to return."
          },
          "order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "The order in which files should be returned."
          },
          "purpose": {
            "type": "string",
            "description": "Filter by file purpose."
          }
        },
        "additionalProperties": false,
        "description": "Action input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The file identifier."
                },
                "bytes": {
                  "type": "integer",
                  "description": "The file size in bytes."
                },
                "object": {
                  "type": "string",
                  "description": "The object type returned by the API."
                },
                "purpose": {
                  "type": "string",
                  "description": "The declared purpose of the file."
                },
                "filename": {
                  "type": "string",
                  "description": "The file name stored by the API."
                },
                "created_at": {
                  "type": "integer",
                  "description": "The Unix timestamp when the file was created."
                }
              },
              "additionalProperties": true,
              "description": "A Qianfan file object."
            },
            "description": "The matching file objects."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for listing Qianfan files."
      }
    },
    {
      "id": "qianfan.list_models",
      "service": "qianfan",
      "name": "list_models",
      "description": "List the models available to the current Baidu Qianfan API key.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input parameters are required for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The top-level object type."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The model identifier."
                },
                "object": {
                  "type": "string",
                  "description": "The object type returned by the API."
                },
                "created": {
                  "type": "integer",
                  "description": "The Unix timestamp when the model metadata was created."
                },
                "owned_by": {
                  "type": "string",
                  "description": "The organization or owner that provides the model."
                }
              },
              "additionalProperties": true,
              "description": "A Qianfan model entry."
            },
            "description": "The list of available models."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for listing Qianfan models."
      }
    },
    {
      "id": "qianfan.list_response_input_items",
      "service": "qianfan",
      "name": "list_response_input_items",
      "description": "List the stored context items for a previously created Baidu Qianfan response.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "response_id": {
            "type": "string",
            "minLength": 1,
            "description": "The response identifier."
          },
          "after": {
            "type": "string",
            "description": "Return items after this item identifier."
          },
          "before": {
            "type": "string",
            "description": "Return items before this item identifier."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "The maximum number of items to return."
          },
          "order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "The order in which input items should be returned."
          }
        },
        "additionalProperties": false,
        "required": [
          "response_id"
        ],
        "description": "The input payload for listing stored response input items."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "data": {
            "type": "array",
            "items": {
              "description": "A stored response context item."
            },
            "description": "The stored response context items."
          },
          "first_id": {
            "type": "string",
            "description": "The first item identifier in the page."
          },
          "last_id": {
            "type": "string",
            "description": "The last item identifier in the page."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more items are available."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for listing stored response input items."
      }
    },
    {
      "id": "qianfan.list_video_generation_tasks",
      "service": "qianfan",
      "name": "list_video_generation_tasks",
      "description": "List Baidu Qianfan video generation tasks with optional filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page_num": {
            "type": "integer",
            "minimum": 1,
            "description": "The page number to fetch."
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of tasks per page."
          },
          "status": {
            "type": "string",
            "description": "Filter by task status."
          },
          "task_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Filter by task identifiers."
          },
          "model_name": {
            "type": "string",
            "description": "Filter by model name."
          },
          "start_time": {
            "type": "string",
            "description": "Filter tasks created after this time."
          },
          "end_time": {
            "type": "string",
            "description": "Filter tasks created before this time."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for listing video generation tasks."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The request identifier."
          },
          "total": {
            "type": "integer",
            "description": "The total number of matching tasks."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The request identifier."
                },
                "task_id": {
                  "type": "string",
                  "description": "The video task identifier."
                },
                "model": {
                  "type": "string",
                  "description": "The video model identifier."
                },
                "status": {
                  "type": "string",
                  "description": "The current task status."
                },
                "content": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "A video generation content item."
                  },
                  "description": "The video task content items."
                }
              },
              "additionalProperties": true,
              "description": "The response payload for a video generation task."
            },
            "description": "The matching video generation tasks."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for listing video generation tasks."
      }
    },
    {
      "id": "qianfan.rerank",
      "service": "qianfan",
      "name": "rerank",
      "description": "Score and rank candidate documents against a query with a Baidu Qianfan rerank model.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The rerank model identifier."
          },
          "query": {
            "type": "string",
            "description": "The search query used to score the candidate documents."
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The ordered candidate documents to rank.",
            "minItems": 1
          },
          "top_n": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of ranked documents to return."
          },
          "return_documents": {
            "type": "boolean",
            "description": "Whether to include the ranked document text in the response."
          },
          "max_chunks_per_doc": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of chunks to evaluate per document."
          },
          "user": {
            "type": "string",
            "description": "An end-user identifier for tracing and abuse monitoring."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for the rerank action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The rerank request identifier."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "description": "A ranked document result."
            },
            "description": "The ranked document results."
          },
          "model": {
            "type": "string",
            "description": "The rerank model used for the response."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "The number of completion tokens generated."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              },
              "input_tokens": {
                "type": "integer",
                "description": "The number of input tokens consumed."
              },
              "output_tokens": {
                "type": "integer",
                "description": "The number of output tokens generated."
              }
            },
            "additionalProperties": true,
            "description": "Token usage metadata returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for the rerank action."
      }
    },
    {
      "id": "qianfan.run_paddleocr_vl",
      "service": "qianfan",
      "name": "run_paddleocr_vl",
      "description": "Run the Baidu Qianfan PaddleOCR-VL endpoint on a document or image.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "description": "The image or document URL, or another upstream-supported file descriptor string."
          },
          "model": {
            "type": "string",
            "description": "The OCR model identifier."
          },
          "fileType": {
            "type": "integer",
            "description": "The file type declared to the upstream API."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for a Qianfan OCR action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The OCR request identifier."
          },
          "result": {
            "description": "The OCR result returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for a Qianfan OCR action."
      }
    },
    {
      "id": "qianfan.run_pp_structure_v3",
      "service": "qianfan",
      "name": "run_pp_structure_v3",
      "description": "Run the Baidu Qianfan PP-StructureV3 OCR endpoint on a document or image.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "description": "The image or document URL, or another upstream-supported file descriptor string."
          },
          "model": {
            "type": "string",
            "description": "The OCR model identifier."
          },
          "fileType": {
            "type": "integer",
            "description": "The file type declared to the upstream API."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for a Qianfan OCR action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The OCR request identifier."
          },
          "result": {
            "description": "The OCR result returned by the API."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for a Qianfan OCR action."
      }
    },
    {
      "id": "qianfan.upload_file",
      "service": "qianfan",
      "name": "upload_file",
      "description": "Upload a file to Baidu Qianfan for batch or other file-based APIs.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "file": {
            "type": "object",
            "properties": {
              "fileId": {
                "type": "string",
                "minLength": 1,
                "description": "The transit file identifier returned by POST /api/files."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Optional filename override to send to the provider."
              },
              "mimeType": {
                "type": "string",
                "minLength": 1,
                "description": "Optional MIME type override to send to the provider."
              }
            },
            "additionalProperties": false,
            "required": [
              "fileId"
            ],
            "description": "The file uploaded through POST /api/files to send to Qianfan."
          },
          "purpose": {
            "type": "string",
            "description": "The declared purpose of the uploaded file."
          }
        },
        "additionalProperties": true,
        "description": "The input payload for uploading a Qianfan file."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The file identifier."
          },
          "bytes": {
            "type": "integer",
            "description": "The file size in bytes."
          },
          "object": {
            "type": "string",
            "description": "The object type returned by the API."
          },
          "purpose": {
            "type": "string",
            "description": "The declared purpose of the file."
          },
          "filename": {
            "type": "string",
            "description": "The file name stored by the API."
          },
          "created_at": {
            "type": "integer",
            "description": "The Unix timestamp when the file was created."
          }
        },
        "additionalProperties": true,
        "description": "A Qianfan file object."
      }
    }
  ]
}
