Microsoft Azure API Management · Arazzo Workflow

Azure API Management AI Gateway Chat and Embed

Version 1.0.0

Send a chat completion through the AI gateway, then embed the same prompt for retrieval.

1 workflow 1 source API 1 provider
View Spec View on GitHub A2AAI GatewayAPI CenterAPI GatewayAPI ManagementEnterpriseMCPMicrosoft AzureArazzoWorkflows

Provider

microsoft-azure-api-management

Workflows

ai-gateway-chat-and-embed
Get a chat completion and an embedding through the AI gateway.
Sends a chat completion request to a chat deployment, then sends the prompt to an embeddings deployment to produce a vector.
2 steps inputs: chatDeploymentId, embeddingDeploymentId, maxTokens, prompt outputs: answer, embedding
1
chatCompletion
Send the prompt as a chat completion request to the chat deployment and capture the assistant answer.
2
embedPrompt
Send the original prompt to the embeddings deployment to produce a vector for indexing and semantic search.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Azure API Management AI Gateway Chat and Embed
  summary: Send a chat completion through the AI gateway, then embed the same prompt for retrieval.
  description: >-
    A retrieval-augmented pattern routed entirely through the API Management AI
    gateway. The workflow sends a chat completion request to a deployment to get
    an assistant answer, then sends the original user prompt to an embeddings
    deployment so it can be stored in a vector index for later semantic search.
    Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: aiApi
  url: ../openapi/microsoft-azure-api-management-ai-api-openapi.yml
  type: openapi
workflows:
- workflowId: ai-gateway-chat-and-embed
  summary: Get a chat completion and an embedding through the AI gateway.
  description: >-
    Sends a chat completion request to a chat deployment, then sends the prompt
    to an embeddings deployment to produce a vector.
  inputs:
    type: object
    required:
    - chatDeploymentId
    - embeddingDeploymentId
    - prompt
    properties:
      chatDeploymentId:
        type: string
        description: The chat deployment identifier (e.g. gpt-4o-deployment).
      embeddingDeploymentId:
        type: string
        description: The embeddings deployment identifier.
      prompt:
        type: string
        description: The user prompt to answer and embed.
      maxTokens:
        type: integer
        description: The maximum number of completion tokens.
  steps:
  - stepId: chatCompletion
    description: >-
      Send the prompt as a chat completion request to the chat deployment and
      capture the assistant answer.
    operationId: AIGateway_ChatCompletions
    parameters:
    - name: deployment-id
      in: path
      value: $inputs.chatDeploymentId
    requestBody:
      contentType: application/json
      payload:
        messages:
        - role: system
          content: You are a helpful assistant.
        - role: user
          content: $inputs.prompt
        max_tokens: $inputs.maxTokens
        temperature: 0.7
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      answer: $response.body#/choices/0/message/content
      totalTokens: $response.body#/usage/total_tokens
  - stepId: embedPrompt
    description: >-
      Send the original prompt to the embeddings deployment to produce a vector
      for indexing and semantic search.
    operationId: AIGateway_Embeddings
    parameters:
    - name: deployment-id
      in: path
      value: $inputs.embeddingDeploymentId
    requestBody:
      contentType: application/json
      payload:
        input: $inputs.prompt
        model: text-embedding-ada-002
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      embedding: $response.body#/data/0/embedding
  outputs:
    answer: $steps.chatCompletion.outputs.answer
    embedding: $steps.embedPrompt.outputs.embedding

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/microsoft-azure-api-management-ai-gateway-chat-and-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.