Serverless.Completions
Stream completions
Generate text based on the given text prompt.
post/serverless/v1/completions#stream
Request
- Base URLhttps://api.friendli.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
X-Friendli-Teamstring nullable
ID of team to run requests as (optional parameter).
Request body
Example request
{
"model": "meta-llama/Llama-3.1-8B-Instruct",
"max_tokens": 200,
"top_k": 1
}Response
Successfully generated a chat response.
Changes
No recorded changes to this operation across all 1 revision of this API.