Vercel · Arazzo Workflow

Vercel AI Gateway Discover Model Then Embed

Version 1.0.0

List available models, confirm the embedding model is present, then create an embedding.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AI GatewaysGatewaysObservabilityWebhookArazzoWorkflows

Provider

vercel

Workflows

discoverModelThenEmbed
Verify an embedding model is in the catalog, then create an embedding.
Lists gateway models, branches on whether the requested embedding model is available, and on success creates an embedding returning the vector and token usage.
2 steps inputs: apiKey, input, model outputs: embedding, totalTokens
1
listModels
List all models reachable through the gateway to confirm availability.
2
embed
Create an embedding for the supplied input using the confirmed model.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Vercel AI Gateway Discover Model Then Embed
  summary: List available models, confirm the embedding model is present, then create an embedding.
  description: >-
    A guarded embedding flow for the Vercel AI Gateway. The workflow lists the
    models reachable through the gateway, confirms the requested embedding model id
    is in the catalog, and only then creates an embedding for the supplied input.
    This keeps embedding requests from being sent against an unavailable model.
    Each step inlines its request and documents the success status.
  version: 1.0.0
sourceDescriptions:
- name: embeddingsApi
  url: ../openapi/vercel-embeddings-api-openapi.yml
  type: openapi
- name: modelsApi
  url: ../openapi/vercel-models-api-openapi.yml
  type: openapi
workflows:
- workflowId: discoverModelThenEmbed
  summary: Verify an embedding model is in the catalog, then create an embedding.
  description: >-
    Lists gateway models, branches on whether the requested embedding model is
    available, and on success creates an embedding returning the vector and token
    usage.
  inputs:
    type: object
    required:
    - apiKey
    - model
    - input
    properties:
      apiKey:
        type: string
        description: Vercel AI Gateway API key (AI_GATEWAY_API_KEY) used as a Bearer token.
      model:
        type: string
        description: "Embedding model id (e.g. openai/text-embedding-3-small)."
      input:
        type: string
        description: The text to embed.
  steps:
  - stepId: listModels
    description: List all models reachable through the gateway to confirm availability.
    operationId: listModels
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      models: $response.body#/data
    onSuccess:
    - name: modelAvailable
      type: goto
      stepId: embed
      criteria:
      - context: $response.body
        condition: $.data[?(@.id == '$inputs.model')]
        type: jsonpath
    - name: modelMissing
      type: end
      criteria:
      - context: $response.body
        condition: $.data[?(@.id == '$inputs.model')].length == 0
        type: jsonpath
  - stepId: embed
    description: Create an embedding for the supplied input using the confirmed model.
    operationId: createEmbedding
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    requestBody:
      contentType: application/json
      payload:
        model: $inputs.model
        input: $inputs.input
        encoding_format: float
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      embedding: $response.body#/data/0/embedding
      promptTokens: $response.body#/usage/prompt_tokens
      totalTokens: $response.body#/usage/total_tokens
  outputs:
    embedding: $steps.embed.outputs.embedding
    totalTokens: $steps.embed.outputs.totalTokens

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/vercel-discover-model-then-embed-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.