Workflow builder

OrcaRouter tools in Dify

Import an OpenAPI schema for discover, inspect and run as a Dify custom tool, then use the catalog from Dify agents and workflows.

Details

Kind
Workflow builder
Connects through
REST API

Set it up

  1. In Dify, open Tools, choose Custom and create a custom tool.
  2. Paste the schema below as the tool's OpenAPI schema.
  3. Set authentication to an API key sent as a Bearer token in the Authorization header, with your OrcaRouter API key, and save.
  4. Add the tool to an agent or a workflow: the model calls discoverTools, reads the input schema with inspectTool, then calls runTool.

Code

OpenAPI schema
openapi: 3.0.1
info:
  title: OrcaRouter tools
  version: "1.0"
servers:
  - url: https://api.orcarouter.ai
paths:
  /v1/tools/discover:
    post:
      operationId: discoverTools
      summary: Find tools in the OrcaRouter catalog for a task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [q]
              properties:
                q:
                  type: string
                  description: What the tool should do, for example "tiktok user profile"
                limit:
                  type: integer
                  description: How many tools to return, at most 10
      responses:
        "200":
          description: Matching tools with their ids and prices
  /v1/tools/{id}:
    get:
      operationId: inspectTool
      summary: Read one tool's description and input schema
      parameters:
        - name: id
          in: path
          required: true
          description: A tool id returned by discoverTools
          schema:
            type: string
      responses:
        "200":
          description: The tool, with its input_schema
  /v1/tools/{id}/run:
    post:
      operationId: runTool
      summary: Run one tool with an input that matches its input schema
      parameters:
        - name: id
          in: path
          required: true
          description: A tool id returned by discoverTools
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [input]
              properties:
                input:
                  type: object
                  description: The tool's input, matching its input_schema
      responses:
        "200":
          description: The tool's output and what the call cost

Recipes to try with Dify

© 2026 OrcaRouter

For Providers

Run an inference platform? Get your models on OrcaRouter.

providers@orcarouter.ai

Join our community

Discordsupport@orcarouter.aiXLinkedInGitHubYouTube