For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tool/Function Calling

Let Parasail models call your functions and tools via the Chat Completions and Responses APIs.

Overview

Tool (function) calling lets a model decide when to invoke an external function—a weather API, a database query, a calculator—and emit a structured request for it. Your application runs the function and feeds the result back to the model.

Parasail exposes tool calling through two OpenAI-compatible surfaces:

  • Chat Completions API (/v1/chat/completions)—the classic single-call interface. You pass tools, inspect message.tool_calls, run the tool, and append a tool message for the next call.

  • Responses API (/v1/responses)—the newer agentic interface built for multi-step loops. You pass tools, inspect response.output for function_call items, and append function_call_output items.

Both use the same base URL and API key:

https://api.parasail.io/v1

The tool schema (name, description, JSON Schema parameters) is the same in both APIs—only the wrapper shape and the response handling differ. Pick Chat Completions for simple one-shot tool calls, and the Responses API for multi-turn agentic workflows.

Supported models

The following models support tool calling and tool_choice as of June 2026. Verify current availability via the models endpoint.

Treat this table as a starting point for validation. Test your actual tool schema and prompt before depending on tool calls in production.

Model
Tools
Tool Choice

parasail-llama-33-70b-fp8

parasail-llama-4-scout-instruct

parasail-llama-4-maverick-instruct-fp8

parasail-qwen3-30b-a3b

parasail-qwen3-235b-a22b

parasail-qwen3-32b

parasail-mistral-devstral-small

In the Chat Completions API, each tool must be wrapped as {"type": "function", "function": {...}}. The function object holds the name, description, and a JSON Schema parameters.

Expected arguments:

Returning the tool result

Run your function, then append the assistant's tool call and a tool message with the result before calling the model again:

Chat Completions tools vs. Responses tools

Chat Completions
Responses API

Tool definition

{"type": "function", "function": {name, description, parameters}}

{"type": "function", name, description, parameters} (flat)

Where calls appear

message.tool_calls[]

response.output[] items with type == "function_call"

Returning results

{"role": "tool", "tool_call_id": ..., "content": ...}

{"type": "function_call_output", "call_id": ..., "output": ...}

Best for

One-shot tool calls

Multi-step agentic loops

The underlying schema—the function name, description, and JSON Schema parameters—is identical between the two; only the wrapper and the result-handling differ.

Next steps

Last updated