Integration guide

Anthropic SDK compatibility with Plugsky

Plugsky publishes an OpenAI-compatible API, not an Anthropic /v1/messages endpoint. Use the OpenAI SDK or a thin adapter, with plugsky-* model IDs.

Short answer. Plugsky is OpenAI-compatible, not Anthropic-format, so the Anthropic SDK cannot point at Plugsky directly. Use the OpenAI SDK with https://api.plugsky.com/v1 and plugsky-* model IDs, or a small adapter. Chat, streaming, tools and vision map cleanly.

What Anthropic SDK compatibility means here

Plugsky's documented API is OpenAI-compatible: it serves /v1/chat/completions, /v1/embeddings and related endpoints. The Anthropic SDK targets a different shape (/v1/messages with Anthropic-style content blocks, tool use and streaming events). Plugsky does not publish an Anthropic-format endpoint, so the Anthropic SDK cannot be pointed at Plugsky directly.

This page explains the honest position and the working options: use the OpenAI SDK against Plugsky, or put a small adapter in front. Either way the models, limits and pricing are the same.

Option 1: use the OpenAI SDK (recommended)

Because the schemas are OpenAI-shaped, the simplest path is to use the OpenAI Python or Node SDK with the Plugsky base URL. Most Anthropic-style features (chat, streaming, tool calling, vision inputs, JSON output) have an OpenAI equivalent that Plugsky supports.

Python
from openai import OpenAI
client = OpenAI(api_key="YOUR_PLUGSKY_API_KEY", base_url="https://api.plugsky.com/v1")
r = client.chat.completions.create(
    model="plugsky-pro",
    messages=[{"role": "user", "content": "Explain retrieval-augmented generation."}],
)
print(r.choices[0].message.content)

If your codebase is built on the Anthropic SDK's message types, wrap the OpenAI call behind a thin function that converts Anthropic-style messages to OpenAI messages and back. Keep the conversion in one module so the rest of your app stays unchanged.

Option 2: an Anthropic-to-OpenAI adapter

A small adapter can expose an Anthropic-shaped interface on top of Plugsky's OpenAI endpoint. The mapping is mechanical:

  • messages with role: user/assistant and content (string or blocks) map to OpenAI messages with the same roles.
  • system maps to an OpenAI system message.
  • max_tokens maps to max_tokens.
  • Tool definitions map to OpenAI tools with type: "function".
  • Streaming maps server-sent events; event names differ, so translate content_block_delta to OpenAI deltas.

Be careful with features that have no OpenAI equivalent on Plugsky: extended thinking blocks, prompt caching hints and Anthropic-specific headers. Drop or ignore those fields rather than sending them.

What maps cleanly

  • Chat completions and streaming.
  • Vision inputs (image URLs or base64) via OpenAI content parts.
  • Tool calling with JSON schema parameters.
  • JSON mode and structured output.
  • Embeddings via plugsky-embed and siblings.

What does not map

  • Anthropic's /v1/messages endpoint shape and event stream.
  • Extended thinking and reasoning blocks: Plugsky does not publish a thinking field; do not expect reasoning content to round-trip.
  • Prompt caching: Plugsky has no published cache-control contract, so do not plan savings from cached input.
  • Anthropic model IDs such as claude-*: use plugsky-* IDs instead.

Limits and gotchas

Main text models have a 262,144-token context window; plugsky-mistral-medium and the vision models use 131,072. Builder allows 256K input and 32K output per request; Scale allows a 512K plan input ceiling and 32K output. Concurrency: Builder 10 requests and 600 RPM, Scale 16 and 1,200 RPM, Hobby 4 and 120 RPM.

Plugsky does not claim ISO 27001, SOC 2 or FedRAMP certification. If your workload requires a certified provider, evaluate that before switching.

Common errors

  • 404 on /v1/messages: Plugsky does not serve that path. Use /v1/chat/completions via the OpenAI SDK.
  • 400 (unknown model): claude-* IDs do not exist on Plugsky. Use a plugsky-* ID from GET /v1/models.
  • 429: RPM, concurrency or daily quota exhausted. Honour Retry-After.

Production checklist

  • Keep the message conversion in one module and unit-test it.
  • Pin the model ID and SDK version.
  • Set explicit timeouts and retries.
  • Log request IDs and token usage; keep prompts out of logs unless policy allows.
  • Test streaming and tool calling end to end before launch.

What we did not verify

  • We did not test an Anthropic-format endpoint on Plugsky; none is published.
  • We did not benchmark latency or throughput.
  • We did not verify every Anthropic SDK feature against an adapter.

Frequently asked questions

Is the Anthropic SDK compatible with Plugsky?

Not directly. Plugsky publishes an OpenAI-compatible API, not an Anthropic /v1/messages endpoint. Use the OpenAI SDK against Plugsky, or a small adapter that translates between the two shapes.

Can I use Claude model IDs on Plugsky?

No. Plugsky's catalogue contains public plugsky-* IDs. List current IDs from GET https://api.plugsky.com/v1/models and use one of those.

How do I convert Anthropic messages to OpenAI messages?

Map role and content fields directly, move system to a system message, map tool definitions to OpenAI tools with type function, and translate streaming events. Keep the conversion in one module.

Do tool calling and vision work?

Yes through the OpenAI equivalents: tools with JSON schema parameters and image content parts. Extended thinking and Anthropic-specific headers are not supported.

Does prompt caching work?

Plugsky has no published cache-control contract, so do not plan savings from cached input.

What base URL should I use?

Use https://api.plugsky.com/v1 with the OpenAI SDK, including the /v1 suffix and without a trailing slash.

How do I fix a 404 on /v1/messages?

Plugsky does not serve that path. Switch to /v1/chat/completions via the OpenAI SDK or an adapter.

Related pages

Run Anthropic-style workloads on Plugsky

Start free, test your adapter end to end, then choose the plan that matches your concurrency.

Start Free → Read the docs

Sources

SDK behaviour was checked against the official Anthropic and OpenAI documentation on 20 November 2026. Plugsky limits were checked against its docs on the same date.

Official pages used for this integration guide
SourcePage checkedChecked
Anthropicdocs.anthropic.com — Messages API20 Nov 2026
OpenAIopenai/openai-python20 Nov 2026
Plugskyplugsky.com/docs and plugsky.com/models20 Nov 2026

Last checked 20 November 2026. Plugsky's canonical plan numbers live at /pricing; this page explains the integration and does not replace the plan terms.

Sources and dated checks

Checked 20 November 2026. Primary sources checked 20 November 2026: OpenAI API reference, Anthropic API getting started, Cloudflare Workers AI. Confirm current limits and pricing in the provider console before capacity planning.