FriendliAI Serverless.Knowledge API
The Serverless.Knowledge API from FriendliAI — 1 operation(s) for serverless.knowledge.
The Serverless.Knowledge API from FriendliAI — 1 operation(s) for serverless.knowledge.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/friendliai:friendliai-serverless-knowledge-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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.
openapi: 3.2.0
info:
title: Friendli Suite API Reference 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:
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.
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.
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
x-provenance:
method: harvested
publisher: FriendliAI
source: https://raw.githubusercontent.com/friendliai/friendli-openapi/refs/heads/main/openapi.yaml
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)