Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Opus 5 API: runnable cURL and Node.js examples

PoYo model page API docs Check

Call Claude Opus 5 through PoYo's Anthropic-compatible Messages endpoint using the exact claude-opus-5 model ID.

Answer: To use the Claude Opus 5 API, send a server-side request to POST https://api.poyo.ai/v1/messages with model claude-opus-5 and a PoYo API key. The examples in this repository are runnable with Node.js 22+ or cURL.

Last verified against the live PoYo schema and pricing on August 9, 2026.

Quickstart

  1. Create a key in the PoYo dashboard.
  2. Copy .env.example to .env and replace the placeholder.
  3. Run node node/index.mjs.
POYO_API_KEY=YOUR_POYO_API_KEY_HERE
POYO_BASE_URL=https://api.poyo.ai

The complete cURL request is in curl/generate.md. The Node.js example prints the complete JSON response.

Model IDs

  • claude-opus-5

Use the exact IDs above. Product names and API model IDs are not always identical.

Request fields

Field Requirement Meaning
model required claude-opus-5.
max_tokens required Maximum generated tokens.
system optional System prompt.
messages required Anthropic-style role/content messages.
stream optional Enable streaming when supported by the client.

Pricing snapshot

Usage Price
Input $2.00 per 1M tokens
Output $10.00 per 1M tokens

Pricing can change. Confirm the current amount on the model page before a production rollout.

Best for

  • complex reasoning
  • code and architecture review
  • research agents

Important behavior

  • This repo uses the Anthropic-compatible /v1/messages route; PoYo also offers an OpenAI-compatible chat route.
  • Use x-api-key on the Messages endpoint.
  • Keep long-lived keys in a server-side secret manager.

Production guidance

Set an application timeout, retry only transient failures, cap output size, and record token usage. Do not put POYO_API_KEY in browser or mobile client code.

Repository map

Links

License

MIT

About

Claude Opus 5 API cURL and Node.js examples through PoYo's Anthropic-compatible Messages API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages