cuopt-server-api-python

Deploy the cuOpt REST server and submit optimization requests via HTTP endpoints.

Updated May 23, 2026
One-click install
npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill cuopt-server-api-python-yo-steven
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cuopt-server-api-python
Source: https://github.com/yo-steven/skills-exploration-20260522/tree/main/skills/cuopt/cuopt-server-api-python
Command: npx skills add https://github.com/yo-steven/skills-exploration-20260522 --skill cuopt-server-api-python-yo-steven

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

Running and using cuOpt’s REST API becomes error-prone when you need to correctly start the server, hit the right endpoints, and format requests for routing/LP/MILP optimization.

Core Features & Use Cases

  • Start and verify the REST service: Launch the cuOpt server (locally or via Docker) and check readiness with the health endpoint.
  • Submit optimization jobs and poll for solutions: Create a request (POST /cuopt/request), capture the reqId, then poll GET /cuopt/solution/{reqId} until results are ready.
  • Use Python and curl-style clients: Provide ready-to-adapt Python requests (requests library) and curl verification guidance.

Example use case: An engineer deploying cuOpt in a container wants to submit a VRP with time windows from Python, wait for the computed route plan, and read back objective value and per-vehicle routes.

Quick Start

Start the server locally on port 8000 and run a POST to /cuopt/request from Python to obtain a reqId, then poll /cuopt/solution/{reqId} until the response contains the solver output.

Frequently Asked Questions about cuopt-server-api-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call the cuOpt REST API to solve a vehicle routing problem?

To call the cuOpt REST API for vehicle routing, launch the server, POST your JSON payload with travel_time_matrix_data and task_data to /cuopt/request, then poll GET /cuopt/solution/{reqId} until the route plan results are ready.

What is the correct way to format a JSON payload for cuOpt linear programming optimization?

Formatting a JSON payload for cuOpt linear programming optimization requires mapping specific fields like travel_time_matrix_data and task_data. You submit this JSON to the POST /cuopt/request endpoint to generate mixed-integer programming solutions asynchronously.

How do I check if the cuOpt server is ready before submitting an optimization job?

Checking if the cuOpt server is ready involves calling the GET /cuopt/health endpoint. A successful response confirms the REST service is active and prepared to accept POST optimization requests.

Can I use Python requests to submit optimization jobs to the cuOpt server?

Yes, you can use Python requests to submit optimization jobs to the cuOpt server. You send the JSON payload via the requests library to the /cuopt/request endpoint, capture the returned reqId, and poll for the computed solution.

How does asynchronous polling work when retrieving cuOpt optimization results?

Asynchronous polling retrieves cuOpt optimization results by repeatedly calling GET /cuopt/solution/{reqId}. You use the reqId from your initial POST request and continue polling until the response contains the solver output and objective values.

Does the cuOpt REST API support pickup-and-delivery scenarios?

Yes, the cuOpt REST API supports pickup-and-delivery scenarios. You configure the task_data mappings within your JSON payload and submit it to the optimization server to compute the required delivery route plans.