跳转到内容
Alpha
  • 模型
  • 排行榜
  • Ori
联系销售

页脚

OpenRouterOpenRouter
© 2026 OpenRouter, Inc

产品

  • 聊天
  • 排行榜
  • 基准测试
  • 应用
  • 发现
  • 模型
  • Ori
  • 合集
  • 提供商
  • 工具
  • 定价
  • Business
  • Enterprise
  • 实验室

公司

  • 关于
  • 博客
  • 客户
  • 招聘
    招聘
  • 隐私
  • 服务条款
  • 信任中心
  • 支持
  • 兼容 OR
  • 数据
  • 品牌

开发者

  • 文档
  • API 参考
  • 开发者平台
  • 状态
  • AI 站点地图

连接

  • Discord
  • GitHub
  • LinkedIn
  • X
  • YouTube
所有服务器工具

Datetime

openrouter:datetime

文档试用此工具

为模型提供可靠的时间上下文。当提示词依赖今天的日期或当前时间时,模型会调用该工具,OpenRouter 则返回当前日期和时间,也可使用配置的时区。

文档试用此工具
工作原理提供商和定价使用此工具相关工具

工作原理

适用于依赖当前日期或时间的提示词,例如日程安排和截止时间。

  1. 1

    您的模型 在需要当天日期或当前时间时调用该工具。

  2. 2

    OpenRouter 返回 UTC 或您设置的时区的当前日期时间。

  3. 3

    您的模型 根据实际日期作答,而不是根据训练数据猜测。

提供商与定价

  • https://openrouter.ai 的网站图标

    OpenRouter

    免费

    在请求期间于 OpenRouter 的进程内运行。

每个请求均按标准模型 token 费用计费。

使用此工具

OpenRouter 在请求期间运行工具并将结果返回给模型,因此无需客户端工具循环。

支持的 API:Chat Completions, Responses, and Anthropic Messages。

shell
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-5.2",
  "tools": [
    {
      "type": "openrouter:datetime"
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "How many days are left until the end of this quarter?"
    }
  ]
}'

文档中提供了设置、参数和示例。

阅读集成指南

相关工具

实用工具

  • Tool search

    Load tool definitions on demand instead of up front

    实用工具