cohere · Capability

Cohere Rerank API — Rerank

Cohere Rerank API — Rerank. 1 operations. Lead operation: Rerank documents by relevance. Self-contained Naftiko capability covering one Cohere business surface.

Run with Naftiko CohereRerank

What You Can Do

POST
Rerank — Rerank documents by relevance
/v1/v2/rerank

MCP Tools

rerank-documents-relevance

Rerank documents by relevance

Capability Spec

rerank-rerank.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Cohere Rerank API — Rerank
  description: 'Cohere Rerank API — Rerank. 1 operations. Lead operation: Rerank documents by relevance. Self-contained Naftiko
    capability covering one Cohere business surface.'
  tags:
  - Cohere
  - Rerank
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COHERE_API_KEY: COHERE_API_KEY
capability:
  consumes:
  - type: http
    namespace: rerank-rerank
    baseUri: https://api.cohere.com
    description: Cohere Rerank API — Rerank business capability. Self-contained, no shared references.
    resources:
    - name: v2-rerank
      path: /v2/rerank
      operations:
      - name: rerank
        method: POST
        description: Rerank documents by relevance
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.COHERE_API_KEY}}'
  exposes:
  - type: rest
    namespace: rerank-rerank-rest
    port: 8080
    description: REST adapter for Cohere Rerank API — Rerank. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v2/rerank
      name: v2-rerank
      description: REST surface for v2-rerank.
      operations:
      - method: POST
        name: rerank
        description: Rerank documents by relevance
        call: rerank-rerank.rerank
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rerank-rerank-mcp
    port: 9090
    transport: http
    description: MCP adapter for Cohere Rerank API — Rerank. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: rerank-documents-relevance
      description: Rerank documents by relevance
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rerank-rerank.rerank
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.