Wide LabsCompute

Grok 4.3

x-ai/grok-4.3 xAITextOpenAI-compatibleStreaming
Input$1.25per 1M tokens
Output$2.50per 1M tokens
Cached input$0.20per 1M tokens
EndpointPOST /v2/openai/v1/chat/completionsOpenAI-compatible

Quick start

Use the OpenAI SDK with these two settings.
Base URL
https://api.widelabs.tr/v2/openai/v1
Model
x-ai/grok-4.3
curl -X POST https://api.widelabs.tr/v2/openai/v1/chat/completions \
  -H "Authorization: Bearer $WIDELABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "x-ai/grok-4.3",
  "messages": [
    {
      "role": "user",
      "content": "Explain the difference between TCP and UDP in simple terms"
    }
  ],
  "max_tokens": 512,
  "temperature": 0.7
}'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.widelabs.tr/v2/openai/v1",
    api_key=os.environ["WIDELABS_API_KEY"],
)

resp = client.chat.completions.create(
    model="x-ai/grok-4.3",
    messages=[{
        "role": "user",
        "content": "Explain the difference between TCP and UDP in simple terms"
    }],
    max_tokens=512,
    temperature=0.7,
)
print(resp.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.widelabs.tr/v2/openai/v1",
  apiKey: process.env.WIDELABS_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "x-ai/grok-4.3",
  messages: [
    {
      role: "user",
      content: "Explain the difference between TCP and UDP in simple terms"
    }
  ],
  max_tokens: 512,
  temperature: 0.7
});
console.log(resp.choices[0].message.content);

Parameters

NameTypeDescription
model requiredstringModel name, case-sensitive, e.g. `openai/gpt-5.4` or `deepseek-ai/DeepSeek-V4-Flash`. Any `text-to-text` model listed under the `openai` source in `GET /v2/models` works here; Claude models use `/v2/anthropic/v1/messages`. `widelabs/auto` routes each request to a model chosen for it (see `routing`).
messages requiredobject[]Array of conversation messages with role and content
max_tokensintegerMaximum tokens to generate (deprecated, use max_completion_tokens). At most the model's output limit; a larger value is refused with 422 naming the limit.
max_completion_tokensintegerMaximum tokens to generate including reasoning. At most the model's output limit; a larger value is refused with 422 naming the limit.
temperaturenumberSampling temperature (0.0-2.0). Not supported on the newest models (the `anthropic/<model>` generation from 4.8 on); such requests are rejected with 422.
top_pnumberNucleus sampling parameter. Not supported on the newest models (the `anthropic/<model>` generation from 4.8 on); such requests are rejected with 422.
frequency_penaltynumberFrequency penalty for token repetition
presence_penaltynumberPresence penalty for topic repetition
stopstring | string[]Stop sequence(s)
streamboolean
default false
Enable streaming responses (SSE format, direct mode only)
response_formatobjectOutput format (e.g. {"type": "json_object"})
seedintegerRandom seed for deterministic output
toolsobject[]Available tools for function calling
tool_choicestring | objectTool choice strategy
parallel_tool_callsbooleanAllow several tool calls in one answer (`false` = at most one). Forwarded as sent; a model that does not take it answers 400.
nintegerNumber of completions to generate
logprobsbooleanReturn log probabilities of output tokens
top_logprobsintegerNumber of most likely tokens to return at each position
userstringUnique identifier for the end-user
safety_identifierstringA stable, non-identifying id for your end user (a hash, never an email), which the provider uses to detect abuse. Forwarded as sent.
prompt_cache_keystringA stable key for requests that share a long prefix, so the provider can reuse its prompt cache across them. Forwarded as sent.
verbosity"low" | "medium" | "high"Answer length preset on models that take it (e.g. the GPT-6 family). Forwarded as sent.
stream_optionsobjectStreaming options (e.g. {"include_usage": true})
storebooleanWhether to store the output for later use
chat_template_kwargsobjectChat template parameters (e.g. {"enable_thinking": true} for reasoning models)
top_kintegerTop-K sampling: keep only the top K tokens. Not supported on the newest models (the `anthropic/<model>` generation from 4.8 on); such requests are rejected with 422.
min_pnumberMin-P sampling threshold (0-1)
repetition_penaltynumberRepetition penalty (1 = none, >1 discourages repeats)
logit_biasobjectToken bias map (token id -> bias)
reasoning_effort"none" | "minimal" | "low" | "medium" | "high" | "xhigh"Reasoning depth preset (OpenAI-style flat field, reasoning models only). Accepted: none, minimal, low, medium, high, xhigh, max. Each model takes its own subset and answers any other value with a 400 — zai-org/glm-5.3, for example, takes low, high and max only.
reasoningobjectReasoning controls object (e.g. {"effort": "high", "max_tokens": 2048, "exclude": false}); reasoning models only
include_reasoningbooleanInclude the reasoning trace in the response (legacy flag; prefer the reasoning object)
structured_outputsbooleanEnforce strict structured outputs when response_format provides a json_schema
webhook_urlstringHTTPS URL to receive a signed completion webhook when the async task reaches a terminal state (requires an API key, "async": true and direct mode; otherwise 422). See the Webhooks section for the delivery payload and events, and GET /v2/customer/webhook-secret for the signing secret + verification.
routingobjectAuto Router's options, only with `model: "widelabs/auto"` (422 `ROUTING_ON_FIXED_MODEL` on any other model). Omitted = engine `default`, models `router-picked`, usecase `auto`, objective `balanced`, sticky `true`. The response carries a `routing` receipt naming the model served and why.

Start building on Wide Labs Compute

Create an account, add credit and send your first request with the SDK you already use.