Create a task
Author a structured AI function over the API — prompt in, typed output out.
A task is a structured AI function: a prompt with typed inputs, a chosen model, and a typed output. Agents call tasks as tools, and you can run them standalone from your own code. This quickstart creates one with a single API call.
What you’ll build: a task that reads a customer review and classifies its sentiment, with output fields ready to verify an attached product image once you enable file input. The next page runs it.
Before you start
Every request is authenticated with a bearer token. Create an API key under Settings → API Clients in your dashboard, then export it and your org and project IDs so the examples below run as-is.
For the full set of auth methods — OAuth 2.0, PKCE, task access tokens — see Authentication.
Pick a model
Tasks run on a model you choose. List the models available to your project and copy an id. So the same task can later verify an attached image, filter to vision-capable models with ?vision=image.
The endpoint returns a plain array. Each entry carries an id, a human-readable alias, supports_vision, and coarse price and speed tiers.
Save the id you want as RB_MODEL — the next step reads it. (llm_model_id requires the model’s id, not its name.)
Give every output field a clear description and, where the answer is a fixed set, an options list. Constrained fields keep values inside a known set, which is what lets downstream code trust the output. See Tasks for nested and constrained output.