OpenAI-compatible

Use a model with Vercel AI SDK through IteraCompute.

Build AI experiences in TypeScript.

The free promotion ends at 00:00 Pacific Time on November 24, 2026. Users with positive net recharge completed before this cutoff retain their existing free tier. Afterward, shared free Auto is limited to these users and users with a currently effective plan. Later recharges do not grant or upgrade free benefits. Plan Auto tokens and monthly shared free benefits are separate allowances.

Connect in three steps

1. Create an API key

Create or sign in to your IteraCompute account, then create a key in the Console.

2. Configure the base URL

Create an OpenAI-compatible provider with the IteraCompute baseURL and pass its model to generateText.

3. Select the model

Use the exact API Model ID for your chosen model. Check its context and capabilities before enabling agent or vision features.

Choose your model

Example configuration

Keep API keys in your server environment or tool credential store. Replace the example key field with your own key where applicable.

example.mjs · Node.js 22+
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";

if (!process.env.ITERACOMPUTE_API_KEY) {
  throw new Error("Set ITERACOMPUTE_API_KEY on the server.");
}
const itera = createOpenAICompatible({
  name: "iteracompute",
  baseURL: "https://api.iteracompute.com/v1",
  apiKey: process.env.ITERACOMPUTE_API_KEY,
});
const { text } = await generateText({
  model: itera("Auto"),
  prompt: "Reply with exactly: Hello!",
  maxOutputTokens: 512,

});
if (!text.trim()) throw new Error("Empty model reply: activation is incomplete.");
console.log(text);

Test the connection

cURL · Chat Completions
# Bash / zsh / WSL; set ITERACOMPUTE_API_KEY in your environment first.
curl --fail-with-body https://api.iteracompute.com/v1/chat/completions \
  -H "Authorization: Bearer $ITERACOMPUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"Auto","messages":[{"role":"user","content":"Reply with exactly: Hello!"}],"max_tokens":512}'

Check that choices[0].message.content contains visible text; HTTP 200 alone is insufficient. Reasoning may consume the output budget. For free Auto, use the first free call example to disable thinking, then send a prompt inside your tool.

First free call

  1. Sign in and confirm that your account has Auto access under the eligibility rules below.
  2. Create a key that allows Auto and save the secret shown once.Open API Keys
  3. Choose your shell below and replace your-api-key with your key.
Auto

Bash on macOS, Linux or WSL requires cURL and Python 3. Keep response.json local.

export ITERACOMPUTE_API_KEY="your-api-key"

curl --fail-with-body --max-time 180 https://api.iteracompute.com/v1/chat/completions \
  -H "Authorization: Bearer $ITERACOMPUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"Auto","messages":[{"role":"user","content":"Reply with exactly: Hello!"}],"max_tokens":512,"reasoning":false}' \
  -o response.json && python3 -c 'import json; r=json.load(open("response.json")); text=r["choices"][0]["message"]["content"]; assert text and text.strip(), "Empty model reply: activation is incomplete"; print(text)'

Success means a non-empty choices[0].message.content. This command prints it and fails on an empty reply; registration or HTTP 200 alone does not complete activation. Expected output: Hello! (wording may vary).

This Auto example disables thinking for a short visible reply. 401/403: check the key and model permission. 429: check monthly usage and concurrency in the Console, then honor Retry-After. Free capacity may queue; do not fire repeated parallel retries.

Run the complete minimal example

Bash · setup and run
mkdir itera-ai-example
cd itera-ai-example
npm init -y
npm install ai@7.0.137 @ai-sdk/openai-compatible@3.0.67
export ITERACOMPUTE_API_KEY="your-api-key"
# Save the example above as example.mjs
node example.mjs

Use Node.js 22 or newer. Run example.mjs on the server. Keep the key in a server environment variable or deployment secret; never use NEXT_PUBLIC_ or VITE_ for it, commit a .env file, or call the API from browser code. This sample uses Chat Completions with free Auto; its thinking option is specific to Auto.

Example output
Hello!

Version and verification

Tested version
ai 7.0.137 · @ai-sdk/openai-compatible 3.0.67 · Node.js 25.2.1
Result
Server-side text generation passed.

Selected model capabilities

Capabilities describe the IteraCompute API. Feature availability in your workflow also depends on the tool and its settings; reasoning controls vary by model.

  • Chat CompletionsSupported
  • Tool callingSupported
  • ReasoningSupported
  • Image inputSupported
  • StreamingSupported

Troubleshooting

401 / 403

Check the API key and permission for Auto. The Free tier does not require a balance or card. Other models may require paid balance.

404 / Wrong endpoint

Use OpenAI Compatible, the /v1 base URL and Auto exactly. Use Chat Completions; do not assume Responses support. Qwen3.8-Max is a different, paid model.

400 / Context or empty reply

For Free, input plus requested max output must fit 131072 tokens. Reduce attached files/history or output budget. HTTP 200 with empty content is incomplete; try the short free-call example, which disables thinking.

429 / Free limits

Check account-wide monthly usage and concurrency in the Console. Honor Retry-After and avoid parallel retries. Exhausted quota has no automatic paid overage; wait for the UTC monthly reset or unlock a higher tier with a top-up.

401 / 403: check the key and model permission. Free Auto requires no balance or card. For paid models, also check available balance.

Vercel AI SDK configuration reference →

Start building with Vercel AI SDK.

Connect your key, choose a model and send your first request.