Serverless.Messages
Messages
Generate responses using Anthropic Messages-style payloads.
post/serverless/v1/messages
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
{
"max_tokens": 128,
"messages": [
{
"content": "Hello, summarize what you can do in one sentence.",
"role": "user"
}
],
"model": "meta-llama/Llama-3.1-8B-Instruct"
}Response
Successfully generated a Messages-style response. For streaming (text/event-stream) event and chunk details, see Messages chunk object.
Changes
No recorded changes to this operation across all 1 revision of this API.