cuopt-numerical-optimization-api

A programming interface for NVIDIA cuOpt, a solver for linear, mixed-integer, and quadratic optimization problems. It supports Python, C, and command-line use.

In plain words
What is it for?
Use it for planning and allocation problems expressed as LP, MILP, or QP models, through the cuOpt APIs, command line, or supported modeling tools.
Why use it?
It lets you solve optimization models through cuOpt or connect existing models from tools such as PuLP, Pyomo, JuMP, CVXPY, AMPL, and GAMS.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nvidia/cuopt/cuopt-numerical-optimization-api
Any agent
npx skills add NVIDIA/cuopt --skill cuopt-numerical-optimization-api
Clone the repo
git clone --depth 1 https://github.com/NVIDIA/cuopt

Made for: Claude Code, Codex.

Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,244 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.01244
Opus 5 $0.00026 $0.00622
Sonnet 5 $0.00010 $0.00249
Haiku 4.5 $0.00005 $0.00124

Measured yesterday against content hash 22d98062800f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cuopt-numerical-optimization-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 10 executable files (assets/python/least_squares/model.py, assets/python/lp_basic/model.py, assets/python/lp_duals/model.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to cuopt-numerical-optimization-api — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/cuopt-numerical-optimization-api/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cuOpt Numerical Optimization API

Model and solve LP, MILP, and QP problems using NVIDIA cuOpt's GPU-accelerated solver.

Interface Selection

Choose the reference for the user's interface:

Interface When to use Reference
Python User is writing Python code references/python_api.md
C / C++ User is embedding in a C/C++ application references/c_api.md
CLI User is solving from MPS files on the command line references/cli_api.md

If the interface is not yet clear, ask before writing any code.

Already using a modeling language? cuOpt also works as a solver backend for third-party modeling tools — AMPL, GAMS / GAMSPy, PuLP, JuMP, Pyomo, and CVXPY — with near-zero code changes (point the model's solver at cuOpt). CVXPY additionally covers convex QP and, in beta, QCQP / SOCP. Prefer this when the user already has a model in one of these tools rather than porting it to the cuOpt API. See Third-Party Modeling Languages.

Choosing LP vs MILP vs QP

Decide from the objective and variables:

If the objective is... And variables are... Use
Linear (sum of c_i * x_i) All continuous LP
Linear Some integer or binary MILP
Has squared (x*x) or cross (x*y) terms Continuous (integer QP not supported) QP (beta)

Prefer LP when the problem allows it. LP solves faster and has stronger optimality guarantees. Use MILP only when the problem logically requires whole numbers or yes/no decisions. Use QP only when the objective is genuinely quadratic (variance, squared error, kinetic energy).

  • Use LP when every quantity can meaningfully be fractional: flows, proportions, rates, dollars, hours, tonnes of material, etc.
  • Use MILP when the problem mentions counts of discrete entities, yes/no choices, or either/or decisions (e.g. open a facility or not, assign a person to a shift, number of trucks).
  • Use QP when the objective minimizes variance, squared error, or any expression with x*x or x*y terms (portfolio optimization, least squares, regularized regression).

Read the full file on GitHub · 104 lines

Files

What ships with it

51 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 104 lines · 51 tokens per session scan A 22d98062800f

Subscribe to this mod's changes

cuopt-numerical-optimization-api is a skill published in the GitHub repository NVIDIA/cuopt (1,032 stars, last pushed 3d ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,244 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cuopt-numerical-optimization-api, differing in 0 lines, and is treated as a copy.