By default, Logic automatically routes your agent execution to the optimal model based on your agent’s requirements. However, you can bypass this routing and explicitly specify which model and reasoning level to use by adding the model query parameter.
Model overrides are an advanced feature. In most cases, Logic’s automatic
model routing will select the best model for your use case. Only use model
overrides when you have specific requirements around model selection.
When using a model override, Logic validates that your chosen model supports your agent’s requirements. If your agent requires capabilities the model doesn’t support, you’ll receive a 400 InvalidModelOverride error.
Capability
OpenAI
Gemini
Groq
Cerebras
PDF Processing
Supported
Supported
Not supported
Not supported
Office Documents
Supported
Supported
Not supported
Not supported
Image Processing
Supported
Supported
Not supported
Not supported
Audio Processing
Not supported
Supported
Not supported
Not supported
HIPAA Compliance
Not supported
Supported
Not supported
Not supported
Tool Usage
Supported
Not supported
Supported
Supported
For example, if your agent processes audio input and you specify ?model=gpt-5.1:low, the request will fail because OpenAI models don’t support audio processing.
// Java requires the OkHttp library. You can add it to your project using Maven or Gradle. Learn more in the Java Quick Start section of the API reference.import okhttp3.*;import java.io.IOException;public class ApiClient { private static final String LOGIC_API_TOKEN = "ls-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; public static void main(String[] args) { OkHttpClient client = new OkHttpClient(); MediaType JSON = MediaType.get("application/json; charset=utf-8"); String jsonBody = """ { // Your input fields here } """; RequestBody body = RequestBody.create(jsonBody, JSON); Request request = new Request.Builder() .url("https://api.logic.inc/v1/agents/{agent_id}/executions?model=gpt-5.1:low") .post(body) .addHeader("Authorization", "Bearer " + LOGIC_API_TOKEN) .addHeader("Content-Type", "application/json") .build(); try (Response response = client.newCall(request).execute()) { String responseBody = response.body().string(); System.out.println(responseBody); } catch (IOException e) { e.printStackTrace(); } }}
If you specify an invalid model or a model that doesn’t support your agent’s requirements, you’ll receive a 400 InvalidModelOverride error:
{ "error": { "code": "InvalidModelOverride", "message": "The specified model 'gpt-5.1:low' does not support audio processing required by this agent" }}