Skip to main content
Toolcall (Function Calling) is an advanced capability on the StepFun platform. It lets models decide which external tools or functions to invoke to satisfy a user request. By using the Toolcall API, you can extend model capabilities to cover more use cases and offer richer features. Below is a minimal JSON request example that must include three key parameters:

model: model name

The following models support Toolcall requests:
  • step-3.7-flash
  • step-3.5-flash
  • step-3.5-flash-2603

Official tools

StepFun provides these built-in tools; configure them to enable the capability directly:
  • Web search: call a search engine to fetch the latest information.
  • Knowledge base search: upload text to a knowledge base and search it to reduce hallucinations.

tools: list of functions

Use tools to describe the functions available locally. Up to 128 tools are allowed. Each entry has type function and contains a function object with the name, description, and parameters.
  • name: letters, numbers, -, _; ideally under 64 characters. Use a clear English name so the model understands it (regex guideline: ^[a-zA-Z*][a-zA-Z0-9-_]63$).
  • parameters: root type must be object. The content follows a subset of JSON Schema; keys follow the same naming rule. See JSON Schema for supported type values. description explains each parameter.
  • description: explains what the function does so the model can choose it; English or Chinese is supported.

messages: conversation context

See Chat Completion request object.

Examples