对话(messages)

circle-info

本站所有llm类模型均同时兼容OpenAI和Anthropic标准格式请求.

消息

post

发送包含文本和/或图像内容的输入消息结构化列表,模型将生成会话中的下一个消息。

消息 API 可用于单次查询或无状态的多轮对话。

头参数
x-api-keystring必填

您的唯一API密钥用于身份验证。

此密钥需要包含在所有API请求的头中,以验证您的帐户并访问服务。通过控制台获取您的API密钥。

Example: {{API_KEY}}
content-typestring必填Example: application/json
请求体
modelstring必填

模型名, 站点所有llm模型均已兼容anthropic格式

max_tokensinteger必填

最大token

响应
chevron-right
200成功
application/json
idstring必填
modelstring必填
rolestring必填
stop_reasonstring必填
stop_sequencenull必填
typestring必填
post
/v1/messages

最后更新于