Skip to main content
This guide covers the complete path from an API key to a usable model response. It uses the OpenAI-compatible route first, then shows the equivalent Anthropic SDK setup.

Before you begin

Create a Planck API key from API Keys, then load it as a server-side environment variable:
Keep this key in a server-side secret store. Never place it in browser code, a NEXT_PUBLIC_* variable, a mobile application bundle, or a public Git repository.

1. List the models available to you

GET /v1/models is authenticated and returns models accessible with your credentials, Planck credit availability, and organization policy.
Each model contains provider-specific endpoints. Capabilities can differ between endpoints offering the same model, so check one endpoint satisfies all of your requirements together.

2. Filter by your use case

Models with chat and image input

Models with tools and streaming on one endpoint

Reasoning models available with Planck credits

Models available through a specific provider

See Model capabilities for every discovery field and the provider-specific parameterContract.

3. Call the selected model

The request format does not determine the provider. You can use an OpenAI-compatible client to call supported Claude, Gemini, Qwen, and other models through Planck.
To lock the request to one endpoint, prefix the model with the provider—for example, groq/qwen/qwen3.8-27b. Leave the prefix off to let Planck select an accessible endpoint.

4. Read the response

An OpenAI-compatible non-streaming response has this shape:
Extract only the assistant text with jq:
Do not assume choices[0] contains text for every operation. Tool-calling responses can contain tool_calls, Anthropic-compatible responses contain typed content blocks, and streaming responses arrive as a sequence of deltas.

5. Choose the next pattern

Common mistakes

  • Sending a Planck key to a provider URL instead of https://api.inquantum.ai.
  • Putting the API key in client-side code.
  • Assuming a model-level capability means every provider endpoint supports it.
  • Treating the model’s maximum output as a default. OpenAI-compatible output limits are optional; Anthropic Messages requires max_tokens.
  • Parsing every response as plain text without checking finish_reason, tool calls, reasoning fields, or stream events.
For authentication, validation, rate-limit, and provider failures, follow the error-handling guide.