Vercel · Arazzo Workflow

Vercel AI Gateway Embed Then Summarize

Version 1.0.0

Create an embedding for a document, then run a chat completion that summarizes it.

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

Provider

vercel

Workflows

embedThenSummarize
Embed a document, then summarize it with a chat completion.
Creates an embedding for the document text and then asks a chat model to summarize that same text, returning both the embedding and the summary.
2 steps inputs: apiKey, chatModel, document, embeddingModel outputs: embedding, summary, totalTokens
1
embed
Create an embedding for the document text.
2
summarize
Ask a chat model to summarize the same document text.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Vercel AI Gateway Embed Then Summarize
  summary: Create an embedding for a document, then run a chat completion that summarizes it.
  description: >-
    A two-operation flow that combines the Vercel AI Gateway embedding and chat
    endpoints. The workflow first embeds the supplied document text so the vector
    is available for indexing or downstream retrieval, then issues a chat
    completion that asks a model to summarize the same text. This is a common
    retrieval-and-generate building block. Each step inlines its request and
    documents the success status.
  version: 1.0.0
sourceDescriptions:
- name: chatApi
  url: ../openapi/vercel-chat-api-openapi.yml
  type: openapi
- name: embeddingsApi
  url: ../openapi/vercel-embeddings-api-openapi.yml
  type: openapi
workflows:
- workflowId: embedThenSummarize
  summary: Embed a document, then summarize it with a chat completion.
  description: >-
    Creates an embedding for the document text and then asks a chat model to
    summarize that same text, returning both the embedding and the summary.
  inputs:
    type: object
    required:
    - apiKey
    - embeddingModel
    - chatModel
    - document
    properties:
      apiKey:
        type: string
        description: Vercel AI Gateway API key (AI_GATEWAY_API_KEY) used as a Bearer token.
      embeddingModel:
        type: string
        description: "Embedding model id (e.g. openai/text-embedding-3-small)."
      chatModel:
        type: string
        description: "Chat model id in 'provider/model-name' form."
      document:
        type: string
        description: The document text to embed and summarize.
  steps:
  - stepId: embed
    description: Create an embedding for the document text.
    operationId: createEmbedding
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    requestBody:
      contentType: application/json
      payload:
        model: $inputs.embeddingModel
        input: $inputs.document
        encoding_format: float
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      embedding: $response.body#/data/0/embedding
  - stepId: summarize
    description: Ask a chat model to summarize the same document text.
    operationId: createChatCompletion
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.apiKey
    requestBody:
      contentType: application/json
      payload:
        model: $inputs.chatModel
        messages:
        - role: system
          content: You are a concise summarizer. Summarize the user's document in three sentences.
        - role: user
          content: $inputs.document
        stream: false
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      summary: $response.body#/choices/0/message/content
      totalTokens: $response.body#/usage/total_tokens
  outputs:
    embedding: $steps.embed.outputs.embedding
    summary: $steps.summarize.outputs.summary
    totalTokens: $steps.summarize.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-embed-then-summarize-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.