Cue reads what someone asked for and picks which of your functions to call, then fills in its arguments. The arguments always validate against that function's JSON Schema, and when nothing fits you get tool: null instead of a forced guess.
Send tools in OpenAI, Anthropic or plain {name, description, parameters} format. It's built for voice commands, chat shortcuts and routing inside apps, where a frontier model is slow and expensive for a menu choice.
Use it
curl https://labs.greatwork.company/v1/run \
-H "Authorization: Bearer $GWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "cue-1",
"input": "is it going to be cold in Chicago tomorrow? use fahrenheit",
"tools": [
{
"name": "get_weather",
"description": "Weather forecast for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"city"
]
}
},
{
"name": "send_message",
"description": "Send a text message to a contact",
"parameters": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"to",
"body"
]
}
}
]
}'const res = await fetch("https://labs.greatwork.company/v1/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GWL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "cue-1",
"input": "is it going to be cold in Chicago tomorrow? use fahrenheit",
"tools": [
{
"name": "get_weather",
"description": "Weather forecast for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"city"
]
}
},
{
"name": "send_message",
"description": "Send a text message to a contact",
"parameters": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"to",
"body"
]
}
}
]
}),
});
const { output, usage } = await res.json();import os, requests
res = requests.post(
"https://labs.greatwork.company/v1/run",
headers={"Authorization": f"Bearer {os.environ['GWL_API_KEY']}"},
json={
"model": "cue-1",
"input": "is it going to be cold in Chicago tomorrow? use fahrenheit",
"tools": [
{
"name": "get_weather",
"description": "Weather forecast for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"city"
]
}
},
{
"name": "send_message",
"description": "Send a text message to a contact",
"parameters": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"to",
"body"
]
}
}
]
},
)
output = res.json()["output"]Set GWL_API_KEY to a key from your dashboard. The bare name cue works too and follows new versions.
Options
input: The user's request (string or array of up to 8).
| Name | Type | Default | What it does |
|---|---|---|---|
tools required | object[] | 1 to 32 functions: {name, description, parameters} (JSON Schema object). OpenAI {type: "function", function: {...}} and Anthropic {name, input_schema} shapes work too. | |
tool_choice | string auto | required | "auto" | required always picks a function; auto can answer tool: null when none fits. |
instructions | string | Extra guidance, e.g. "the user is in Chicago" or "prefer search_orders for anything about a purchase". |
Output
| Field | Type | Meaning |
|---|---|---|
tool | string | Name of the function to call, or null when none fits. |
arguments | object | Arguments matching that function's schema (null when tool is null). |
Every response wraps this in {"id", "model", "output", "usage": {"units", "unit", "cost_usd"}, "latency_ms"}. Send an array as input and output is an array in the same order.
Examples
Weather
{
"model": "cue-1",
"input": "is it going to be cold in Chicago tomorrow? use fahrenheit",
"tools": [
{
"name": "get_weather",
"description": "Weather forecast for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"city"
]
}
},
{
"name": "send_message",
"description": "Send a text message to a contact",
"parameters": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"to",
"body"
]
}
}
]
}{
"tool": "get_weather",
"arguments": {
"city": "Chicago",
"unit": "fahrenheit"
}
}Captured on our production servers: 4884 ms, 1 text, $0.0003.
Text a contact
{
"model": "cue-1",
"input": "text mom that I'll be 10 minutes late",
"tools": [
{
"name": "get_weather",
"description": "Weather forecast for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
}
},
"required": [
"city"
]
}
},
{
"name": "send_message",
"description": "Send a text message to a contact",
"parameters": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"to",
"body"
]
}
}
]
}{
"tool": "send_message",
"arguments": {
"to": "mom",
"body": "I'll be 10 minutes late"
}
}Captured on our production servers: 4664 ms, 1 text, $0.0003.
Nothing fits
{
"model": "cue-1",
"input": "what's 17 times 23?",
"tools": [
{
"name": "get_weather",
"description": "Weather forecast for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
}
},
"required": [
"city"
]
}
},
{
"name": "send_message",
"description": "Send a text message to a contact",
"parameters": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"to",
"body"
]
}
}
]
}{
"tool": null,
"arguments": null
}Captured on our production servers: 2533 ms, 1 text, $0.0003.
Good for
- Voice commands in apps ("text mom I'm late")
- Route chat messages to the right handler
- Fill forms from one sentence
- Cheap first pass before a big agent
Limits and caveats
- Relative dates and times ("next Tuesday at 3pm") are often wrong: resolve them in your code, or pass today's context in
instructions. - Best with up to about 10 clearly different functions; similar names and descriptions get confused.
- One function per request; it doesn't plan multi-step work.
Pricing
$0.30 per 1,000 calls. One unit per started 2,000 characters of input. Failed calls aren't charged, and a call never costs more than its estimate (POST /v1/estimate tells you before you run it).
Built on
Qwen/Qwen3-0.6B (with JSON-schema constrained decoding), 0.6B parameters. License: Apache-2.0. We run it on our servers with JSON-schema constrained decoding, so every answer parses.