Explain HTTP requests and responses to a programming beginner, using three steps and one simple example.
USER MESSAGEMake complex ideas clear
Define the reader, response length and structure to keep an answer focused on the question.
No matching models
Explore all modelsAccess Claude Opus 4.8 by Anthropic through its native API for conversations, content generation and application development. Explore token pricing, context limits and ready-to-use integration examples.
curl 'https://newrouters.com/v1/messages' \
-H "Content-Type: application/json" \
-H "x-api-key: $MODEL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
--data '{
"model": "claude-opus-4-8",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Explain how an HTTP request works in three concise steps."
}
],
"stream": false
}'const apiKey = process.env.MODEL_API_KEY;
const response = await fetch("https://newrouters.com/v1/messages", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": apiKey,
"anthropic-version": "2023-06-01"
},
body: JSON.stringify({
"model": "claude-opus-4-8",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Explain how an HTTP request works in three concise steps."
}
],
"stream": false
})
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.text());import os
import json
import requests
response = requests.post(
"https://newrouters.com/v1/messages",
headers={
"Content-Type": "application/json",
"x-api-key": os.environ["MODEL_API_KEY"],
"anthropic-version": "2023-06-01"
},
json=json.loads("{\"model\":\"claude-opus-4-8\",\"max_tokens\":1024,\"messages\":[{\"role\":\"user\",\"content\":\"Explain how an HTTP request works in three concise steps.\"}],\"stream\":false}"),
timeout=300,
)
response.raise_for_status()
print(response.text)Set MODEL_API_KEY in your server environment. Requests use this model’s native API and your account pricing.
Estimate one request, then choose a budget for your workflow.
| Usage | Quantity | Rate | Cost |
|---|---|---|---|
| tokens | $0.5/ 1M | $0.0005 | |
| tokens | $0.05/ 1M | $0 | |
| tokens | $0.625/ 1M | $0 | |
| tokens | $1/ 1M | $0 | |
| tokens | $2.5/ 1M | $0.00125 | |
| tokens | $2.5/ 1M | $0 |
Public USD estimate. Your account rate and final recorded usage determine the actual charge.
| Specification | Our price | Official reference |
|---|---|---|
| Input | $0.5 / 1M tokens | $5 About 90% less than official |
| Cached input | $0.05 / 1M tokens | $0.5 About 90% less than official |
| Cache write · 5m | $0.625 / 1M tokens | $6.25 About 90% less than official |
| Cache write · 1h | $1 / 1M tokens | $10 About 90% less than official |
| Output | $2.5 / 1M tokens | $25 About 90% less than official |
| Reasoning | $2.5 / 1M tokens | $25 About 90% less than official |
Start with a clear task. Copy these example prompts into your own API requests.
Explain HTTP requests and responses to a programming beginner, using three steps and one simple example.
USER MESSAGEDefine the reader, response length and structure to keep an answer focused on the question.
Write a TypeScript async retry function with exponential backoff. Explain which errors should be retried and include a usage example.
USER MESSAGESpecify the language, inputs, outputs and constraints, then request code and an explanation together.
Create a two-week product prototype plan for a team of three. List goals, deliverables and open questions for each day.
USER MESSAGEProvide context and practical constraints to organize material into a structure you can work with.
Access Claude Opus 4.8 by Anthropic through its native API for conversations, content generation and application development. Explore token pricing, context limits and ready-to-use integration examples.
Use the model ID below with the supported native endpoint. System instructions define the task and response style; messages provide the context for each request. Check the available capabilities and token limits when integrating the model into your application.
| Specification | Claude Opus 4.8 |
|---|---|
| Model ID | claude-opus-4-8 |
| Provider | Anthropic |
| API | /v1/messages |
| Context window | 1,000,000 tokens |
| Maximum output | 128,000 tokens |
| Declared capabilities | Tools · Streaming · Reasoning · Structured output |
claude · claude-opus-4-8
tools · stream · reasoning · structured_output
| Specification | Claude Opus 4.8 | gpt-5.4 | GPT-5.5 |
|---|---|---|---|
| Provider | Anthropic | OpenAI | OpenAI |
| Input → output | TextText | TextText | TextText |
| Selection basis | Current model | Same billing units | Same billing units |
| Context / max output | 1,000,000 / 128,000 | 1,050,000 / 128,000 | 1,050,000 / 128,000 |
| Starting price | $0.5 / 1M tokens | $0.5 / 1M tokens | $1 / 1M tokens |
Choose by the input types, output settings and billing unit your workflow needs. Try the same prompt across models to compare results for your own use case.
Keep the native request format and point your application to the platform API. Prepare a key with model access, then review status and charges in your usage records.
View API examplesEverything you need to know about API access, pricing and model capabilities.
Charges depend on the recorded token usage and your account rates. Input, output and supported cache or reasoning categories are listed separately in the pricing table. The calculator uses public USD prices; the final usage receipt determines the charge.
Choose “Get API access” to open the integration guide. Sign in to your NewRouters account, prepare a key with access to this model and copy an API example.
Supported endpoints: /v1/messages、/v1/messages/count_tokens. Choose an endpoint in the API examples to see its native request format.
The current model route declares streaming support. Use the native endpoint’s streaming option and consume its events. Usage already completed may still be billed if the connection is interrupted.
Tools: supported. Structured output: supported. Request fields follow the selected native endpoint.
Keep the request ID and open your account’s LLM usage records to inspect request status, token counts and charges. Prompt and answer content are not a conversation history in this view.
Combine instructions and context to build question-and-answer experiences.
Explore ↗Integrate code explanations, content processing and assistance into your app.
Explore ↗Define inputs and outputs for summaries, rewriting and information organization.
Explore ↗Hello, API.Prepare a key, choose a model and send a minimal request.
View docs section ↗{ messages: [...] }Explore request formats for OpenAI, Claude and Gemini.
View docs section ↗build(something)Configure requests, handle responses and review usage.
View docs section ↗