惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
Vercel News
Vercel News
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
量子位
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
IT之家
IT之家
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
博客园 - 三生石上(FineUI控件)

Heroku Dev Center Articles

Migrating from the Nginx Buildpack to Front-End Web CNB | Heroku Dev Center Migrating from create-react-app-buildpack to Front-End Web CNB | Heroku Dev Center How the Front-End Web Cloud Native Buildpack Works | Heroku Dev Center Deploying Front-End Web Apps on Heroku | Heroku Dev Center Understanding Heroku User Roles and Permissions | Heroku Dev Center Choosing the Right Apache Kafka on Heroku Plan | Heroku Dev Center Provisioning Apache Kafka on Heroku | Heroku Dev Center Managing Topics and Partitions on Apache Kafka on Heroku | Heroku Dev Center Apache Kafka on Heroku Version Support | Heroku Dev Center Changing the Plan of an Apache Kafka on Heroku Cluster | Heroku Dev Center Connecting to an Apache Kafka on Heroku Cluster | Heroku Dev Center Apache Kafka on Heroku Metrics Logs | Heroku Dev Center Heroku GitHub Enterprise Cloud Integration Using GitHub Apps | Heroku Dev Center Heroku Connect for Independent Software Vendors (ISV) | Heroku Dev Center Heroku-26 Stack | Heroku Dev Center Connection Limits on Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Migrating to Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Heroku Postgres Advanced Quotas (Limited GA) | Heroku Dev Center Manage Instance Pools on Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Provisioning Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Getting Started with Heroku Postgres Advanced (Limited GA) | Heroku Dev Center Usage and Billing on Heroku Postgres Advanced (Limited GA) | Heroku Dev Center
Managed Inference and Agents API with Claude Opus 4.8 | H...
2026-05-29 · via Heroku Dev Center Articles

Table of Contents [expand]

  • When to Use This Model
  • Usage
  • Example curl Requests

Last updated May 28, 2026

Claude Opus 4.8 is a large language model (LLM) in Anthropic’s Claude family that supports conversational chat, tool-calling, autonomous coding, effort control, and enhanced reasoning for complex tasks with extended thinking. It offers a highly intelligent, fast, and practical solution you can use to power your AI apps. This version, claude-opus-4-8, offers better performance than the claude-opus-4-7 model.

  • Model ID: claude-opus-4-8
  • Region: us, eu

When to Use This Model

Claude Opus 4.8 supports a variety of use cases, including advanced software development, complex agentic workflows, and enterprise operations. It’s optimized to combine maximum intelligence and capability with functional performance.

Usage

Claude Opus 4.8 follows our Claude /v1/chat/completions API schema.

To provision access to the model, attach the Managed Inference and Agents add-on to your app $APP_NAME:

heroku addons:create heroku-inference:standard -a $APP_NAME

Using config variables, you can invoke the model in various ways:

Multimodal Support

  • Supported inputs: text, image
  • Supported outputs: text

Rate Limits

  • Maximum requests per minute: 50
  • Maximum tokens per minute: 300,000

Prompt Caching

Prompt caching is supported for system prompts and tools. The minimum tokens required for prompt caching is 4,096.

Example curl Requests

To retrieve and export your API credentials:

export INFERENCE_KEY=$(heroku config:get -a $APP_NAME INFERENCE_KEY)
export INFERENCE_URL=$(heroku config:get -a $APP_NAME INFERENCE_URL)

Text to Text

curl $INFERENCE_URL/v1/chat/completions \
  -H "Authorization: Bearer $INFERENCE_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "model": "claude-opus-4-8",
  "messages": [
    { "role": "user", "content": "Hello!" },
    { "role": "assistant", "content": "Hi there! How can I assist you today?" },
    { "role": "user", "content": "What's the weather like in Portland, Oregon right now?" }
  ],
  "max_tokens": 100,
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Fetches the current weather for a given city.",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The city and state, e.g. San Francisco, CA"
            }
          },
          "required": ["location"]
        }
      }
    }
  ],
  "tool_choice": "auto"
}
EOF

Image to Text

curl -X POST "$INFERENCE_URL/v1/chat/completions" \
  -H "Authorization: Bearer $INFERENCE_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "model": "claude-opus-4-8",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What do you see in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Heroku_logo.svg/960px-Heroku_logo.svg.png"
          }
        }
      ]
    }
  ]
}
EOF