Discover a Model and Send a Message
A 3-step recipe with Anthropic. We can help you get access.
Recipe · 3 steps
Discover a Model and Send a Message
with Anthropic
Pick an available model, validate it, and generate a message with it.
- List the models available to this account so a caller can confirm the desired model is present before using it.
- Resolve the requested model id to confirm it exists and is available before attempting to generate a message with it.
- Send a single user message to the validated model and capture the generated content and token usage.
What you'll need to have ready
- apiKey: A valid Anthropic API key sent in the x-api-key header.
- modelId: The model id or alias to validate and use (e.g. claude-sonnet-4-20250514).
- prompt: The user prompt text to send to the model.
- maxTokens: Maximum number of tokens to generate.
For your developer
Arazzo workflow anthropic:discover-model-and-message, 3 operations: models_list → models_get → messages_post. Specs on APIs.io.