Claude · Arazzo Workflow

Claude Select Model and Create Message

Version 1.0.0

Discover an available Claude model, confirm its metadata, then generate a message with it.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Artificial IntelligenceChatbotsConversational AIGenerative AILarge Language ModelsMachine-LearningNatural Language ProcessingArazzoWorkflows

Provider

claude

Workflows

select-model-and-create-message
Pick the latest available model and use it to generate a message.
Lists models, retrieves metadata for the most recently released model, and sends a prompt to that model, returning the generated text and token usage.
3 steps inputs: anthropicVersion, apiKey, maxTokens, prompt outputs: content, displayName, messageId, modelId, usage
1
listAvailableModels
List available Claude models. The most recently released models are returned first, so the first item is the newest model.
2
confirmModel
Retrieve metadata for the newest model to confirm its identifier and human-readable display name before using it.
3
createMessage
Send a single-turn user prompt to the confirmed model and capture the generated content and token usage.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Claude Select Model and Create Message
  summary: Discover an available Claude model, confirm its metadata, then generate a message with it.
  description: >-
    A model-aware completion flow. The workflow first lists the available
    Claude models so the most recently released model can be selected, then
    retrieves that model's metadata to confirm its identifier and display name,
    and finally sends a single-turn prompt to the Messages API using the
    resolved model. Every step spells out its request inline — including the
    required x-api-key and anthropic-version headers — so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: messagesApi
  url: ../openapi/claude-messages-api-openapi.yml
  type: openapi
- name: modelsApi
  url: ../openapi/claude-models-api-openapi.yml
  type: openapi
workflows:
- workflowId: select-model-and-create-message
  summary: Pick the latest available model and use it to generate a message.
  description: >-
    Lists models, retrieves metadata for the most recently released model, and
    sends a prompt to that model, returning the generated text and token usage.
  inputs:
    type: object
    required:
    - apiKey
    - prompt
    properties:
      apiKey:
        type: string
        description: Anthropic API key sent in the x-api-key header.
      anthropicVersion:
        type: string
        description: Value for the required anthropic-version header.
        default: '2023-06-01'
      prompt:
        type: string
        description: The user prompt to send to the selected model.
      maxTokens:
        type: integer
        description: Maximum number of tokens to generate.
        default: 1024
  steps:
  - stepId: listAvailableModels
    description: >-
      List available Claude models. The most recently released models are
      returned first, so the first item is the newest model.
    operationId: listModels
    parameters:
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: anthropic-version
      in: header
      value: $inputs.anthropicVersion
    - name: limit
      in: query
      value: 20
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      latestModelId: $response.body#/data/0/id
      hasMore: $response.body#/has_more
  - stepId: confirmModel
    description: >-
      Retrieve metadata for the newest model to confirm its identifier and
      human-readable display name before using it.
    operationId: getModel
    parameters:
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: anthropic-version
      in: header
      value: $inputs.anthropicVersion
    - name: model_id
      in: path
      value: $steps.listAvailableModels.outputs.latestModelId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      modelId: $response.body#/id
      displayName: $response.body#/display_name
  - stepId: createMessage
    description: >-
      Send a single-turn user prompt to the confirmed model and capture the
      generated content and token usage.
    operationId: createMessage
    parameters:
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: anthropic-version
      in: header
      value: $inputs.anthropicVersion
    requestBody:
      contentType: application/json
      payload:
        model: $steps.confirmModel.outputs.modelId
        max_tokens: $inputs.maxTokens
        messages:
        - role: user
          content: $inputs.prompt
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      messageId: $response.body#/id
      content: $response.body#/content
      stopReason: $response.body#/stop_reason
      usage: $response.body#/usage
  outputs:
    modelId: $steps.confirmModel.outputs.modelId
    displayName: $steps.confirmModel.outputs.displayName
    messageId: $steps.createMessage.outputs.messageId
    content: $steps.createMessage.outputs.content
    usage: $steps.createMessage.outputs.usage

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/claude-select-model-and-create-message-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.