Skip to main content
Don’t care about the details? Please see the examples below

Passing provider-specific parameters

Bytez forwards parameters directly to the underlying model provider. This allows you to pass any supported parameters as defined in the official provider API docs: Parameters are supplied as the second argument to model.run(...) with SDKs, or as fields in the REST body when using curl/HTTP. Bytez does not modify or restrict provider-specific options — it passes them through verbatim. Always check the provider docs below for the most accurate and up-to-date list of supported options and parameter behavior. The raw response from the provider is included in the provider property of the object returned by our API.

Examples (Non-Exhaustive)

import Bytez from "bytez.js";

// insert your key
const sdk = new Bytez("BYTEZ_KEY");

// choose your model
const model = sdk.model("openai/o4-mini-deep-research");

// send to the model
const { error, output, provider } = await model.run(
  "Best places to eat vietnamese food near melbourne florida, only search 5 websites",
  {
    tools: [
      {
        type: "web_search"
      }
    ]
  });

console.log({ error, output });
console.log(provider);
import Bytez from "bytez.js";

// insert your key
const sdk = new Bytez("BYTEZ_KEY");

// choose your model
const model = sdk.model("openai/sora-2-pro");

// send to the model
const { error, output, provider } = await model.run(
  "Best places to eat vietnamese food near melbourne florida, only search 5 websites",
  {
    // generate a 7 second video instead of the default 4 second video
    seconds: 7
  });

console.log({ error, output });
console.log(provider);
import Bytez from "bytez.js";

// insert your key
const sdk = new Bytez("BYTEZ_KEY");

// choose your model
const model = sdk.model("google/gemini-2.5-pro");

// provide the model your chat session
const messages = [
  {
    role: "user",
    content: [
      {
        type: "text",
        text: [
          "What is the latest model available?",
          "Compute the sum of the first 50 prime numbers using code execution.",
          "Then compare two roast chicken recipes and their cooking times."
        ].join(" ")
      }
    ]
  }
];

// send to model with provider-specific parameters
const { error, output, provider } = await model.run(messages, {
  max_new_tokens: 1024 * 16,
  tools: [
    { googleSearch: {} },
    { urlContext: {} },
    { codeExecution: {} }
  ],
  urls: ["https://www.google.com"]
});

console.log({ error, output });
console.log(provider);
import Bytez from "bytez.js";

// insert your key
const sdk = new Bytez("BYTEZ_KEY");

// choose your model
const model = sdk.model("gemini-3-pro-preview");

// provide the model your chat session
const messages = [
  {
    role: "user",
    content: [
      {
        type: "text",
        text: "How does AI work?"
      }
    ]
  }
];

// send to model with provider-specific parameters
const { error, output, provider } = await model.run(messages, {
  max_new_tokens: 1024 * 16,
  thinkingConfig: {
    thinkingLevel: "low",
  }
});

console.log({ error, output });
console.log(provider);
import Bytez from "bytez.js";

// insert your key
const sdk = new Bytez("BYTEZ_KEY");

// choose your model
const model = sdk.model("openai/o4-mini-deep-research");

// send to the model
const { error, output, provider } = await model.run(
  "Best places to eat vietnamese food near melbourne florida, only search 5 websites",
  {
    tools: [
      {
        type: "web_search"
      }
    ]
  });

console.log({ error, output });
console.log(provider);