FriendliAI Serverless.Knowledge API

The Serverless.Knowledge API from FriendliAI — 1 operation(s) for serverless.knowledge.

Operations 1

POST /serverless/v1/knowledge/retrieve Retrieve contexts from chosen knowledge base #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/friendliai-serverless-knowledge-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

friendliai-serverless-knowledge-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Friendli Suite API Reference Container.Audio Serverless.Knowledge API
  description: This is an OpenAPI reference of Friendli Suite API.
  termsOfService: https://friendli.ai/terms-of-service
  contact:
    name: FriendliAI Support Team
    email: support@friendli.ai
  version: 0.1.0
servers:
- url: https://api.friendli.ai
tags:
- name: Serverless.Knowledge
paths:
  /serverless/v1/knowledge/retrieve:
    post:
      tags:
      - Serverless.Knowledge
      summary: Retrieve contexts from chosen knowledge base
      description: Retrieve related documents from knowledge base by similarity.
      operationId: serverlessKnowledgeRetrieve
      security:
      - token: []
      parameters:
      - name: X-Friendli-Team
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: ID of team to run requests as (optional parameter).
          title: X-Friendli-Team
        description: ID of team to run requests as (optional parameter).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServerlessKnowledgeRetrievalBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerlessKnowledgeRetrievalSuccess'
        '400':
          description: Bad Request
        '422':
          description: Unprocessable Entity
      x-speakeasy-name-override: retrieve
      x-speakeasy-ignore: true
components:
  schemas:
    ServerlessKnowledgeRetrievalSuccess:
      properties:
        results:
          items:
            $ref: '#/components/schemas/KnowledgeRetrievedChunk'
          type: array
          title: Results
          description: A list of result.
      type: object
      required:
      - results
      title: ServerlessKnowledgeRetrievalSuccess
      description: Knowledge retrieval response.
    ServerlessKnowledgeRetrievalBody:
      properties:
        query:
          type: string
          title: Query
          description: A text string used to find relevant information within the knowledge-base.
          examples:
          - Chicken dinner
        k:
          type: integer
          title: K
          description: Maximum number of top-ranked knowledge-base entries to return in results.
          examples:
          - 1
        knowledgeIds:
          items:
            type: string
          type: array
          title: Knowledge Ids
          description: A List of knowledge-base IDs. For now, only one knowledge-base is supported.
          examples:
          - - knowledge-base-id-1
      type: object
      required:
      - query
      - k
      - knowledgeIds
      title: ServerlessKnowledgeRetrievalBody
      description: Knowledge retrieval request.
    KnowledgeRetrievedChunk:
      properties:
        text:
          type: string
          title: Text
          description: Retrieved text matching the search query.
        score:
          type: number
          title: Score
          description: Numerical relevance score of the retrieved result.
        contentChunkId:
          type: string
          title: Content Chunk Id
          description: ID of specific text segment.
        contentId:
          type: string
          title: Content Id
          description: ID of content in knowledge-base.
      type: object
      required:
      - text
      - score
      - contentChunkId
      - contentId
      title: KnowledgeRetrievedChunk
      description: Knowledge retrieved chunk.
  securitySchemes:
    token:
      type: http
      description: 'When using Friendli Suite API for inference requests, you need to provide a **Friendli Token** for authentication and authorization purposes.


        For more detailed information, please refer [here](https://friendli.ai/docs/openapi/introduction#authentication).'
      scheme: bearer
x-speakeasy-retries:
  strategy: backoff
  backoff:
    initialInterval: 500
    maxInterval: 60000
    maxElapsedTime: 3600000
    exponent: 1.5
  statusCodes:
  - 429
  - 500
  - 502
  - 503
  - 504
  retryConnectionErrors: true