Overview

Every frontier model, five minutes away

APIArc brings models from different providers behind one API endpoint. Keep the OpenAI SDK you already know—change the base URL, API key, and model ID.

Updated August 2026

The shortest path

Already using the OpenAI SDK? You only need these three changes.

01

Create a key

Generate an API key in the console

02

Change the endpoint

Point the base URL at APIArc

03

Choose a model

Copy a model ID from the catalog

Quickstart

Make your first request

This example uses the Chat Completions protocol. It works with common OpenAI clients and quickly verifies your key, network, and model access.

1

Create an API key

Sign in, open API keys, and create a key. The full value is shown once, so store it safely before closing the window.

Create an API key
2

Set an environment variable

Keep the key in your server environment. Never commit it to Git or include it in browser code.

.env
export APIARC_API_KEY="your_api_key_here"
3

Send the request

Run any example below. It sends a short greeting to DeepSeek Chat.

curl https://api.apiarc.dev/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $APIARC_API_KEY" \
  -d '{
    "model": "deepseek-chat",
    "messages": [
      {"role": "user", "content": "Say hello in one sentence."}
    ]
  }'

Successful response: The HTTP status is 200 and the model text is returned in choices[0].message.content.

Authentication

Every request uses a bearer token

APIArc uses the API key to identify your project and meter usage. Put it in the Authorization header; no extra request signing is required.

HTTP header
Authorization: Bearer $APIARC_API_KEY

A key carries your account permissions

Anyone with the key can spend your balance. If it appears in logs, screenshots, or a public repository, revoke and replace it immediately.

  • Read keys from server-side environment variables, never from the browser.
  • Use a separate key per app or environment so usage and revocation stay isolated.
  • Rotate production keys by deploying the new key before revoking the old one.
Core API

One base URL, several compatible protocols

Chat Completions is enough for most applications. When you need native capabilities, use the Responses, Anthropic Messages, or Gemini generateContent protocol supported by the model.

Base URLhttps://api.apiarc.dev
EndpointPurposeBest for
/v1/chat/completionsMulti-turn text and tool callsExisting OpenAI-compatible apps
/v1/responsesOpenAI Responses protocolNative Responses capabilities
/v1/messagesAnthropic Messages protocolNative Claude clients
/v1/modelsList available modelsDynamic selection and health checks

Compatibility does not make every model identical

The request shape can be unified while context length, tool use, image input, and structured output still vary by model. Confirm capabilities and pricing on the model page before shipping.

Models & routing

Switch models by changing one string

The model field chooses the model that handles the request. The endpoint, authentication, and response parsing stay the same, so one integration can compare several providers.

Model ID
deepseek-chat

The catalog changes over time. Copy the exact ID shown on the model page instead of guessing it from the display name.

Browse model catalog

Production recommendation

Establish a quality and cost baseline for your primary model, then test a backup that uses the same protocol. You can switch quickly during a provider incident without changing business logic.

Streaming

Show the first token sooner

Add stream: true to the request body. APIArc forwards upstream output as Server-Sent Events (SSE) as it arrives.

TypeScript
const stream = await client.chat.completions.create({
  model: "deepseek-chat",
  messages: [{ role: "user", content: "Explain API gateways." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Read each data: event, append its content delta, and finish when [DONE] arrives. If the connection breaks, do not store the partial answer as a complete result.

Error handling

Separate fixable errors from retryable failures

Start with the HTTP status, then record the error message and request ID. Fix client configuration errors immediately; retry brief network or upstream failures with backoff.

StatusCommon causeRecommended action
400Invalid field or model IDFix the request; do not retry unchanged
401Missing, invalid, or revoked keyCheck the Authorization header
402Insufficient account balanceAdd credits before retrying
429Rate or quota exceededBack off exponentially and reduce concurrency
5xxGateway or upstream unavailableRetry after a short backoff or switch models

Keep the request ID

When contacting support, provide the request ID, time, model, and endpoint. Never send an API key, full prompt, or payment information.

Ship safely

Production checklist

One successful request proves the integration works. Shipping also requires clear boundaries for timeouts, retries, credentials, and cost.

01

Set timeouts

Limit both connection time and total generation time.

02

Retry carefully

Retry only 429, network errors, and selected 5xx responses with exponential backoff.

03

Protect keys

Store keys only in server-side secret managers or environment variables.

04

Log request IDs

Keep model, latency, status, and request ID without logging sensitive content.

05

Watch spend

Review usage by key and model, and alert on unexpected consumption.

06

Plan a fallback

Test a backup model and a non-streaming path for critical traffic.

Ready to make your first request?

Create a key, then copy a model ID from the catalog.