jijzeptai
jijzeptai is the Python SDK for submitting optimization jobs and working with
Project files in JijZept AI. It supports CPython 3.11, 3.12, 3.13, and 3.14.
Install
With uv:
uv add jijzeptai
With pip:
python -m pip install jijzeptai
JijModeling and OMMX are included as required dependencies.
AI coding plugin
The SDK includes a version-matched
Agent Plugin containing one Agent
Skill with task-specific references for setup, connection checks, Solver jobs,
deployed models, Project files, and CLI management. The SDK can copy the Skill
directly into a Python project that depends on jijzeptai:
jijzeptai skill install --agent codex
Run these commands in the environment where the SDK is installed. In a
uv-managed project, prefix them with uv run. For Claude Code, use
--agent claude-code. The commands place jijzeptai in
the current project's .agents/skills/ or .claude/skills/ directory. Pass
--project PATH when running from outside the project root.
The same package includes local marketplace catalogs for Codex, Claude Code, and compatible clients. These commands print absolute paths inside the installed SDK:
jijzeptai plugin path
jijzeptai marketplace path
For example, Codex and Claude Code can register the bundled marketplace and install the same versioned plugin without GitHub CLI:
codex plugin marketplace add "$(jijzeptai marketplace path)"
codex plugin add jijzeptai@jijzeptai
claude plugin marketplace add "$(jijzeptai marketplace path)"
claude plugin install jijzeptai@jijzeptai
GitHub Copilot CLI can install the plugin directory directly:
copilot plugin install "$(jijzeptai plugin path)"
To install the bundled Skill with another skill manager, print its source
directory. The command writes one absolute path containing jijzeptai/:
jijzeptai skill path
gh skill install "$(jijzeptai skill path)" jijzeptai --from-local --agent codex --scope project
In a uv project, prefix these commands with uv run. Without the console
script, replace jijzeptai with python -m jijzeptai in any command. Choose
one manager for each destination: the SDK CLI updates only the copies that it
installed itself, while a plugin client manages plugins installed through its
marketplace.
After upgrading the project's SDK, copy the skill from that installed version:
jijzeptai skill status --agent codex
jijzeptai skill update --agent codex
status exits successfully only when the installed skill matches the current
SDK. update does not upgrade the Python package or contact a remote service.
Use jijzeptai skill remove --agent codex to remove a CLI-managed skill.
These commands refuse to overwrite another manager's installation or a
locally edited skill. Update and remove preserve the previous copy under a
hidden .jijzeptai-backup-* directory outside the agent's skills/ directory
so a late editor save cannot destroy it. Remove those backups manually after
closing editors that may still have the old files open.
Create and configure an API token
In JijZept AI, open the account menu and choose API Tokens. Create a token for the current Organization. The value appears only once, so copy it into your environment with the production JijZept AI URL and do not put it in source code:
export JIJZEPTAI_BASE_URL="https://ai.jijzept.com"
export JIJZEPTAI_API_TOKEN="<token from JijZept AI>"
DeveloperClient reads these variables by default. You can also pass
base_url="https://ai.jijzept.com" and api_token as constructor arguments
when that fits your program better.
Use an authenticated call such as list_projects() to verify that the service
accepts the token. The token's string format alone does not prove acceptance.
Project files
The client exposes Project listing, single-file transfers, selected-file transfers, and directory-tree transfers. The Organization always comes from the verified API token; these methods do not accept an Organization ID.
import os
from jijzeptai import DeveloperClient
client = DeveloperClient()
projects = client.list_projects()
project_id = projects[0].id
page = client.list_project_files(project_id, path="/data", limit=100)
while page.has_more:
page = client.list_project_files(
project_id,
path="/data",
cursor=page.next_cursor,
limit=100,
)
client.create_directory(project_id, "/data", exist_ok=True)
uploaded = client.upload_file(
project_id,
local_path="input.csv",
remote_path="/data/input.csv",
overwrite=True,
)
saved_path = client.download_file(
project_id,
remote_path=uploaded.path,
local_path="input-copy.csv",
overwrite=True,
)
client.create_directory(project_id, "/workspace/src", parents=True, exist_ok=True)
selected = client.upload_files(
project_id,
["pyproject.toml", "src/main.py"],
remote_directory="/workspace",
)
tree = client.upload_directory(
project_id,
".",
"/workspace-tree",
ignore_patterns=[".venv/", "dist/"],
)
os.makedirs("downloads", exist_ok=True)
downloaded = client.download_files(
project_id,
["pyproject.toml", "src/main.py"],
remote_directory="/workspace",
local_directory="downloads",
)
downloaded_tree = client.download_directory(
project_id,
"/workspace-tree",
"downloads/workspace-tree",
)
list_project_files accepts an absolute POSIX-style directory path. Its
cursor is opaque and belongs to the same path and pagination flow. Single-file
and multi-file methods use the same collection-shaped Developer APIs. One
upload call publishes one atomic FileTree commit within the documented
500-entry limit; an oversized selection fails before byte transfer and is not
split into partial commits. Upload refuses an existing remote path unless
overwrite=True. Download refuses an existing local path unless
overwrite=True and publishes the completed download atomically from a
temporary file. Directory methods preserve relative paths and explicit empty
directories, always exclude .git/, and reject symlinks and special entries.
Uploads and downloads use short-lived signed object-storage URLs internally.
The SDK never sends the JijZept AI Authorization header to those URLs.
Uploads bind a CRC32C checksum to the signed PUT, and downloads verify the
provider-measured CRC32C response header before atomically publishing the local
file.
If every retry loses the mutation outcome or ends in a retryable server error,
ProjectFileMutationIndeterminateError exposes the mutation Idempotency-Key.
The FileTree change may have committed; this error must not be treated as a
rollback.
Bulk upload, download, and session cleanup run sequentially. Uploads still publish one atomic FileTree mutation after every selected file transfers.
Model listing
list_models() and list_model_versions(name) return a ModelPage with
items and next_cursor. Each call returns one page. Solver owns the default
of 20 items; an explicit limit must be between 1 and 100.
page = client.list_models()
while True:
for model in page.items:
print(model.name, model.tag)
if page.next_cursor is None:
break
page = client.list_models(cursor=page.next_cursor)
For versions of one model, use client.list_model_versions("knapsack") and
preserve that name on subsequent calls. Cursors follow immutable model ID order;
traversal covers a fixed catalog without duplicates or omissions. Concurrent
registrations do not form a snapshot, so start a new traversal to refresh it.
No method automatically collects all pages or reads individual model details.
List items contain basic version metadata without summary. Read descriptive
metadata and input_schema explicitly through the detail method:
model = client.get_model("knapsack", "demo")
input_schema = model.summary.get("input_schema") if model.summary else None
Minimal model workflow
This flow deploys a reusable JijModeling model, submits input data, waits for
optimization, and downloads the solution. If the service denies deployment,
ask someone with current deployment permission to share a model's name and tag,
then call submit_job_by_deployed_model with those values if authorized (skip
deploy_model).
import jijmodeling as jm
from jijzeptai import DeveloperClient
# Define a reusable knapsack model.
@jm.Problem.define("knapsack", sense=jm.ProblemSense.MAXIMIZE)
def knapsack(problem: jm.DecoratedProblem):
values = problem.Float(ndim=1)
item_count = values.len_at(0)
weights = problem.Float(shape=(item_count,))
capacity = problem.Float()
selected = problem.BinaryVar(
"selected",
shape=(item_count,),
description="item selected",
)
problem += jm.sum(values * selected)
problem += problem.Constraint(
"capacity",
jm.sum(weights * selected) <= capacity,
)
# Create the SDK client for JijZept AI.
client = DeveloperClient()
# Publish the model so the Organization can run it with new input later.
model = client.deploy_model("knapsack", "demo", knapsack)
# Start an optimization job with concrete input values.
job = client.submit_job_by_deployed_model(
model.name,
model.tag,
{
"values": [10.0, 20.0, 15.0, 30.0],
"weights": [2.0, 3.0, 5.0, 7.0],
"capacity": 10.0,
},
)
# Wait for completed calculation, which may return no Solution.
finished = client.wait_for_success(job.job_id)
if finished.solver_result is not None and finished.solver_result.solution is None:
print(finished.solver_result.termination_reason)
else:
solution = client.download_solution(finished.job_id)
print(solution.extract_decision_variables("selected")) # selected items
print(solution.objective) # candidate objective value
print(solution.feasible) # True when all constraints hold
A succeeded job means that the calculation completed, including a search that
returned no Solution. solver_result records the reported search termination
and optional candidate facts. A Solver time limit is separate from a platform
timed_out job. not_provided means the Solver API did not provide its reason;
solver_result=None means these facts were not recorded (including historical
jobs). A candidate with feasible=False does not prove the problem infeasible.
download_solution raises NoSolutionError when a completed result has no
Solution.
Permissions
JijZept AI checks current Organization permissions for each operation. Handle
AuthorizationError when the service denies a call and confirm current access
in JijZept AI. The SDK does not grant or change roles. Deployed models belong
to the Organization; the service determines access to jobs and results.
Errors
Catch JijZeptAIError for failures raised by this package, or
JijZeptApiError for an HTTP status, service error code, and response details.
Invalid arguments and local path or overwrite-policy violations raise
TypeError or ValueError. Authentication failures use HTTP 401, permission
failures use HTTP 403, stale FileTree writes use HTTP 409 or 412, and
unverifiable current identity or authorization state uses HTTP 503.
from jijzeptai import (
JijZeptAIError,
JijZeptApiError,
ProjectFileMutationIndeterminateError,
TransportError,
)
try:
uploaded = client.upload_file(
project_id,
local_path="input.csv",
remote_path="/data/input.csv",
)
except ProjectFileMutationIndeterminateError as error:
print(f"Upload outcome unknown; idempotency key: {error.idempotency_key}")
except TransportError as error:
print(f"Network request failed: {error}")
except JijZeptApiError as error:
print(f"API request failed ({error.status_code}): {error.message}")
except JijZeptAIError as error:
print(f"JijZept AI operation failed: {error}")
License
Apache-2.0 covers the published jijzeptai package. It does not license the
JijZept AI hosted service, API tokens, user models or data, service terms, or
JIJ Inc. trademarks and the JijZept AI product name.
Run a published model as a User
Install 0.9.0 and verify the installed version:
uv add 'jijzeptai==0.9.0'
uv run python -c "import jijzeptai; print(jijzeptai.__version__, jijzeptai.__file__)"
With pip, use python -m pip install 'jijzeptai==0.9.0'.
UserClient uses Deploy OAuth credentials. A member signs in with PKCE and
consent; an Organization Admin can separately create application credentials
for machine-to-machine use. Application credentials are not a personal token.
from jijzeptai import MemberCredentials, UserClient
credentials = MemberCredentials()
client = UserClient(credentials, base_url="https://ai.jijzept.com")
print(client.healthz()) # Health does not verify permissions or capacity.
page = client.list_models()
for model in page.items:
print(model.id, model.alias, model.status)
# Continue with client.list_models(cursor=page.next_cursor) when it is not None.
The first member request opens the browser. The client registers a public OAuth
client when the provider supports registration; save credentials.client_id
and pass it as MemberCredentials(client_id=...) in future sessions. Supply a compatible
client ID when public registration is unavailable. Tokens stay in memory.
After sign-in, close the browser tab and return to Python if the tab remains open.
Call credentials.sign_in() to reconnect after access is withdrawn or refresh
fails. sign_in(timeout_seconds=300) limits the wait for the browser callback.
OAuth metadata and token requests have their own connect and read timeouts.
Tokens refresh automatically during a wait.
For an application, supply its client ID and secret as keyword arguments.
Keep the secret out of source code and logs.
from jijzeptai import ApplicationCredentials, UserClient
client = UserClient(
ApplicationCredentials(client_id=client_id, client_secret=client_secret),
base_url="https://ai.jijzept.com",
)
Both clients accept base_url directly. If omitted or None, they read
JIJZEPTAI_BASE_URL. An explicit value takes precedence; an empty value is an
error. UserClient requires a service origin without an API path, query, or
fragment. HTTPS and loopback HTTP development origins are supported.
Construct a UserClient before calling credentials.token() or
credentials.sign_in(). Construction binds the credentials to that origin
without network access. The same credentials can be reused for the same origin,
with or without a trailing slash. A different origin requires new credentials.
client.credentials, credentials.base_url, and credentials.resource are
read-only. Credentials and cached tokens cannot be moved to another origin.
DeveloperClient uses an API token, while UserClient uses member PKCE or
application OAuth.
Select the fixed model.id, not its mutable alias. The SDK generates a request
key for each input upload and Job submission.
file_id = client.upload_input("input.json")
job = client.submit_job(model.id, file_id)
print(job.job_id, job.status)
job = client.wait_for_terminal(job.job_id, timeout_seconds=120)
if job.status == "succeeded":
solution = client.download_solution(job.job_id, "solution.pb")
print(solution.feasible)
If either operation raises an exception, its idempotency_key attribute contains
the key for that operation. After an uncertain submission response, call
client.recover_job(error.idempotency_key) using the original service and actor.
Recovery reads the original submission receipt. Retry an upload with the same
file and key, or retry submission with exactly the original arguments and key.
The service fingerprints the FileID; matching bytes in a new FileID do not make
it the same request. None does not prove an earlier request is no longer in
flight. A 404 after recovery expires is not permission to use a new Job key.
For recovery after an abrupt process exit, generate and persist your own keys
and the original submission arguments before the calls. Pass each saved key as
idempotency_key. The SDK does not persist automatically generated keys.
wait_for_terminal uses a polling deadline. Credential renewal or an in-flight
HTTP request can overrun that deadline. Connect and read timeouts do not provide
a strict total deadline. A local timeout leaves the Job running and differs
from the Solver's time_limit_seconds. A succeeded Job does not guarantee a
feasible or optimal solution. list_jobs returns one page; get_job reads a
retained Job. Cancellation follows the service's submitter or Admin policy.
The service reports actual authorization, rate-limit and readiness errors. If a model has no execution slots, ask the Developer or Admin who manages its allocation. Downloads verify the generation, size, and CRC32C before saving, and never overwrite the destination. An interrupted upload can resume from its measured offset with the original file key and unchanged local input.
Shared client results
Both clients return the exact Job type for submission, get, cancellation,
waiting, and every Job-list item. User recovery returns Job or None.
job_id: UUID, status: JobStatus, solver_version_resolved, solver_params,
solver_result, timings, finished_at, and the error fields are attributes
of Job. Submission inputs and authentication differ by role.
Role-specific facts are under job.metadata:
| Metadata type | Fields |
|---|---|
DeveloperJobMetadata |
solver_name, solver_version_requested, created_at, cancel_requested_at, started_at, last_heartbeat_at, artifacts, model |
DeployJobMetadata |
model_id, model_digest, actor, actor_name, client_id, accepted_at, terminal_reason, elapsed_ms, computation_run_id, input_file_id, queue_reason, queue_deadline_at, model_snapshot, description, alias |
from jijzeptai import DeveloperJobMetadata, DeployJobMetadata, Job
job: Job = client.get_job(job_id)
print(job.job_id, job.status, job.solver_result)
if isinstance(job.metadata, DeveloperJobMetadata):
print(job.metadata.created_at, job.metadata.artifacts)
elif isinstance(job.metadata, DeployJobMetadata):
print(job.metadata.accepted_at, job.metadata.input_file_id)
Each Job is a snapshot of one response. Optional facts omitted by a summary or
history response are None; this does not prove that the remote Job lacks them.
Call client.get_job(job.job_id) explicitly when details are needed. The SDK
does not fetch details automatically, and the original Job stays unchanged.
Even a detail response can leave unrecorded or inapplicable facts as None.
Developer responses do not supply solver_params, so that field is None.
User detail responses include the recorded solver limits in solver_params.
For Developer artifacts, None means the response omitted them and () means
the response contained an empty list. Deploy history's metadata.description
is a preview; full text remains in metadata.model_snapshot["description"]
when a detail response supplies the snapshot. Developer created_at and Deploy
accepted_at retain their distinct meanings.
Use .items to read model and Job collections from either client. Developer
list_jobs() returns a JobPage with next_cursor=None because its endpoint
returns the complete visible list. User history retains its as_of snapshot and
next_cursor. Continue through User pages explicitly.
Both clients accept download_solution(job_id, destination=None) and return an
ommx.v1.Solution. Omit the destination to receive the solution without a saved
file, or supply a path to save it without overwriting an existing file. User
downloads verify the same transfer metadata in either case.
Read Job fields through attributes. Job IDs are UUID values, timestamps are
timezone-aware datetimes, and statuses are JobStatus values. solver_params,
solver_result, and timings use SDK dataclasses with attribute access when
present. Convert UUID values with str(...) when writing your own JSON records.
Both clients' wait methods default to a 300-second timeout and a 1-second polling interval.
Model identifiers for each client
DeveloperClient provides Project and Solver operations. Its deployed-model
methods use the Solver client API and identify models by name and tag.
UserClient.list_models() returns Deploy catalog publications. Pass the fixed
model.id to UserClient.submit_job(). A publication ID is distinct from a
mutable alias or a Solver model's name and tag.
Use client.get_model(model_id) to retrieve one publication by its fixed ID.
The returned model's status is the execution admission state observed by that
request. Fetch the model again to check its current state. The full runtime
observation remains available, including the allocation and observation time.
The detail result also includes content_digest, size_bytes, and
input_contract; these fields are None on list items because the list does
not fetch model details.
Metadata
Release files for jijzeptai 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jijzeptai-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for jijzeptai-0.9.0-py3-none-any.whl |
Release files / jijzeptai-0.9.0-py3-none-any.whl
| Download URL | jijzeptai-0.9.0-py3-none-any.whl |
|---|---|
| Size | 69.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8e3a41c741ea70135ac832e086f7df73fcf2a6cbf3f33c38e1950f93897a9f5
|
|
BLAKE2b-256 checksum How to use checksums |
999893dd01ad851be21897249c466062a880bb1a65f1d475f55f9fbd20dc0d97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logSecurity for jijzeptai 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for jijzeptai-0.9.0-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.