概览
LLM (对话 / 指令)
对话回应、文档摘要、代码生成・补全、函数调用 (tool / function calling)、串流回应,全部用同一个端点。将模型绑定到您的项目后,从 `/v1/chat/completions` 与 `/v1/completions` 调用。
- 端点
- /v1/chat/completions
- 范例模型
- llama-3.1-8b-instruct
API
API 范例
# 1) discover an online chat model — Grid's set changes constantly,
# don't hardcode an id in your code.
MODEL=$(curl -s https://api.openalchemy.io/v1/models \
-H "Authorization: Bearer $OPENALCHEMY_API_KEY" \
| jq -r '.data[] | select(.online and .endpoint_type=="chat") | .id' \
| head -1)
# 2) chat
curl https://api.openalchemy.io/v1/chat/completions \
-H "Authorization: Bearer $OPENALCHEMY_API_KEY" \
-H "X-Project-Id: $YOUR_PROJECT_ID" \
-H "Content-Type: application/json" \
-d "{
\"model\": \"$MODEL\",
\"messages\": [
{\"role\": \"user\", \"content\": \"Hello, OpenAlchemy.\"}
]
}"状态
额度与定价 (每项目)
额度与速率限制套用于发出 API 密钥的项目;另有依网域范围的政策层,限制哪些来源得以调用各模态。
START TODAY
准备好把推论成本变成更接近炼金术的东西了吗?
免费方案让您创建一个项目、免信用卡运行前 1,000 次请求。