Requirements
- Dedicated container inference access: Contact your account representative or the sales team to enable dedicated container inference for your organization.
- Together API key: The
curlcommands in steps 5 to 7 read your key from theTOGETHER_API_KEYenvironment variable, so export it before you start. - Docker: Jig uses your local Docker to build and push the container image. See the Docker installation guide.
- uv: For installing the Together CLI. See uv’s installation guide.
Step 1: Install the Together CLI
Install the Together CLI, which includes the Jig commands (tg beta jig) that build and deploy your container:
Step 2: Clone the Sprocket examples
Clone the Sprocket repository, which contains the example workers:sprocket/examples/hello-world. Sprocket calls setup() once when the worker starts and predict() once per job. Here, predict() reads name from the job’s arguments and returns a greeting:
Step 3: Build and deploy
Jig reads the deployment configuration from the worker’spyproject.toml. The example worker uses this one:
[tool.jig.image] table tells Jig how to build the image, and [tool.jig.deploy] sets the deployment’s resources and replica bounds. This example runs a single CPU-only replica.
Jig uses name under [project] as the deployment name, which must be globally unique. Change hello-world to a name of your own in examples/hello-world/pyproject.toml, and use that name in place of hello-world in the commands in steps 5 to 7.
If you’re logged in with
tg login, pass your API key explicitly on the first deploy: tg beta jig deploy --api-key "$TOGETHER_API_KEY". The first deploy stores an API key in the deployment, and it can’t use a tg login session for that. While you’re logged in, the CLI ignores TOGETHER_API_KEY.deploy command does three things:
- Builds the Docker image from the example.
- Pushes it to Together’s private registry.
- Creates a deployment on Together’s infrastructure.
Step 4: Check that the deployment is running
Poll the deployment’s status withwatch. macOS doesn’t include watch by default, so install it first with brew install watch or your package manager of choice:
running and its replicas are ready, then press Ctrl+C to stop watching.
You can also check deployment status in the Together AI console.
Step 5: Test the health endpoint
Call the deployment’s health endpoint to confirm the worker is up:Step 6: Submit a job
Submit a job to the deployment’s queue. Themodel field takes your deployment name, and predict() receives payload as its arguments:
request_id. Copy it for the next step:
Step 7: Get the job result
Check the job’s status. Replacereq_abc123 with the request_id from step 6, a UUIDv7 value such as 019ba379-92da-71e4-ac40-d98059fd67c7:
status is done and outputs holds the worker’s greeting:
Step 8: View the logs
Stream your deployment’s logs:Step 9: Delete the deployment
The deployment keeps a replica running until you delete it, becausemin_replicas is 1. When you’re done, delete the deployment:
Next steps
Now that you’ve deployed your first container, explore the full platform:Dedicated container inference overview
Read the architecture and core concepts.
Jig CLI
Build, push, and deploy containers, and manage secrets and volumes.
Sprocket SDK
Build queue-integrated inference workers.
API reference
Call the REST API for deployments, secrets, and queues.
Tutorials
Image generation with FLUX.2
Run single-GPU inference with 4-bit quantization.
Video generation with Wan 2.1
Run multi-GPU inference with torchrun.
Serve an OpenAI-compatible endpoint
Run in HTTP server mode behind the OpenAI Images API.
Deploy a prebuilt vLLM image
Serve Qwen2.5-VL from the stock vLLM image, with no Sprocket code and no Docker build.