We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
openrouter/auto-codeRuns on your balance at the prices above. New accounts start with free usage.
Settings
Auto Code is a model from OpenRouter, listed under the model id openrouter/auto-code. It sits in the image category while also supporting text, so it is best understood as a multimodal model rather than a pure text generator. OpenRouter describes it as the API's router built specifically for coding agents and harnesses, using the same routing engine as the Auto Router, with every request treated as part of an ongoing coding workflow. That framing matters for developers: Auto Code is aimed at agentic coding setups rather than single-shot chat.
The model accepts text, image, audio, file and video as inputs, and it can return both text and image as outputs. Its context window is 2,000,000 tokens, which is large enough to hold substantial codebases, long logs or extended conversation history in a single request. The maximum output is 65,536 tokens. Because inputs include files and video alongside text and images, you can feed it mixed material such as screenshots, recordings, documents and source files within the same request.
Those capabilities point to a fairly specific set of uses. Coding agents and harnesses are the primary target, so tasks like multi-step code generation, repository-level refactoring, debugging from stack traces and logs, and reviewing diffs fit naturally. The image output modality extends this to generating diagrams or visual assets alongside code. With audio and video input, you can also work from recorded walkthroughs, screen captures or spoken descriptions, and the file input supports attaching project documents or configuration files directly. The long context helps when an agent needs to keep an entire session, including earlier tool calls and their results, in view.
You call Auto Code through api14's OpenAI-compatible API using the model id openrouter/auto-code. Because the interface follows the OpenAI format, existing clients and SDKs work with minimal changes. The model supports a broad set of request parameters, including temperature, top_p, top_k, min_p, top_a, frequency_penalty, presence_penalty, repetition_penalty, seed, stop, logit_bias, logprobs and top_logprobs. For output control there is max_tokens, max_completion_tokens, response_format, structured_outputs and verbosity. Tool use is covered by tools, tool_choice and parallel_tool_calls. Reasoning behaviour can be tuned with reasoning, reasoning_effort and include_reasoning.
The main practical constraint is output size: responses are capped at 65,536 tokens, so work that needs a very large single generation may have to be split across calls. Auto Code is also a router rather than a single fixed model, so behaviour can vary between requests as the routing engine selects a backend. If you need predictable, identical behaviour from one call to the next, a fixed model may suit you better; if you are building a coding agent that benefits from routing across varied inputs, Auto Code is designed for exactly that.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.images.generate({
"model": "openrouter/auto-code",
"prompt": "A minimalist product photo of a ceramic mug on a wooden table",
"n": 1,
"aspect_ratio": "1:1"
});
import { writeFile } from "node:fs/promises";
await writeFile("image.png", Buffer.from(result.data[0].b64_json, "base64"));
frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_completion_tokensmax_tokensmin_pparallel_tool_callspresence_penaltyreasoningreasoning_effortrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_atop_ktop_logprobstop_pverbosityThis community has no topics yet. Open the first one about Auto Code.