> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orchestrallabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Import a pi0.5 checkpoint, deploy near your application, and predict from NumPy arrays.

Send NumPy inputs; get action arrays. Your application reads sensors and applies actions.

Requires Python 3.12+ on macOS/Linux, a Servo account, and a
[connected Hugging Face account](https://accounts.orchestrallabs.ai/account/huggingface).
No local GPU or robot registration is needed.
Save Python examples using their shown filenames; run them with `python FILENAME.py`.

<Steps>
  <Step title="Install and sign in">
    Install Servo and sign in:

    ```bash your computer theme={null}
    python -m venv .venv
    source .venv/bin/activate
    python -m pip install servo-client
    servo login
    servo whoami
    ```

    On a headless computer, follow the printed sign-in link and code.
    CLI and Python share your saved sign-in; telemetry is configured automatically.
  </Step>

  <Step title="Inspect the model inputs">
    Read the checkpoint contract before allocating capacity or creating arrays:

    <Tabs>
      <Tab title="CLI">
        Inspect the checkpoint:

        ```bash your computer theme={null}
        servo model inspect hf://npow/pi05-yam-red-cap-full-7500 \
          --revision 39c6876521b3d8363452bed6731c8705b3944c24
        ```

        Sample output:

        ```text Sample output theme={null}
        Checkpoint: npow/pi05-yam-red-cap-full-7500@39c6876521b3d8363452bed6731c8705b3944c24
        Runtime: openpi
        Input contract: resolved
        Input middle (image): [224, 224, 3], HWC, uint8
        Input left (image): [224, 224, 3], HWC, uint8
        Input right (image): [224, 224, 3], HWC, uint8
        Input state (state): [7], float32
        Action chunk shape: [15, 7]
        Served from its own files: yes
        ```
      </Tab>

      <Tab title="Python">
        Inspect the checkpoint with Python:

        ```python inspect_checkpoint.py theme={null}
        import servo

        sv = servo.Servo()
        inspection = sv.models.inspect_checkpoint(
            "https://huggingface.co/npow/pi05-yam-red-cap-full-7500",
            revision="39c6876521b3d8363452bed6731c8705b3944c24",
        )
        contract = inspection.input_contract
        print(contract.resolution)
        for feature in contract.inputs or []:
            print(feature.name, feature.shape, feature.dtype, feature.layout)
        print("Actions:", contract.outputs["actions"].shape)
        ```

        Sample output:

        ```text Sample output theme={null}
        resolved
        middle (224, 224, 3) uint8 HWC
        left (224, 224, 3) uint8 HWC
        right (224, 224, 3) uint8 HWC
        state (7,) float32 None
        Actions: (15, 7)
        ```
      </Tab>
    </Tabs>

    Use the exact input keys, shapes and dtypes shown above.
    `HWC` means height, width, channels; `None` means no image layout.
    Continue only when the contract is `resolved`.
    The checkpoint documentation defines camera placement, state units and action meanings.
  </Step>

  <Step title="Import and deploy">
    <Tabs>
      <Tab title="CLI">
        Import, then deploy using the returned model ID:

        ```bash your computer theme={null}
        servo model import hf://npow/pi05-yam-red-cap-full-7500 \
          --revision 39c6876521b3d8363452bed6731c8705b3944c24
        ```

        Run the returned `MODEL_ID=` assignment in your shell, then deploy:

        ```bash your computer theme={null}
        servo model deploy "$MODEL_ID" --city "Zurich, Switzerland" --wait --timeout 900
        ```

        Save the printed deployment ID; this command waits for readiness.
      </Tab>

      <Tab title="Python">
        Import the checkpoint and wait for deployment readiness:

        ```python deploy_checkpoint.py theme={null}
        import servo

        sv = servo.Servo()
        model = sv.models.import_checkpoint(
            "https://huggingface.co/npow/pi05-yam-red-cap-full-7500",
            revision="39c6876521b3d8363452bed6731c8705b3944c24",
        )
        deployment = model.deploy(city="Zurich, Switzerland")
        print("DEPLOYMENT_ID=" + deployment.id)
        deployment.wait(timeout_s=900)
        ```
      </Tab>
    </Tabs>

    Deployment allocates hosted capacity and requires an organization member or API key.
    The first import may download weights and compile; both examples wait for readiness.
    Servo aims to provision for the fastest end-to-end latency.
    Repeated requests for the same model and site reuse the deployment.
    A timeout does not cancel it: inspect or stop it below.
  </Step>

  <Step title="Provide model inputs and predict">
    Create sample arrays matching the inspected contract and make one prediction:

    ```python first_prediction.py theme={null}
    import numpy as np
    from numpy.random import randint
    import servo

    sv = servo.Servo()
    deployment = sv.deployments.get(input("Deployment ID: "))
    policy = deployment.policy()

    inputs = {
        "middle": randint(0, 256, (224, 224, 3), dtype=np.uint8),
        "left": randint(0, 256, (224, 224, 3), dtype=np.uint8),
        "right": randint(0, 256, (224, 224, 3), dtype=np.uint8),
        "state": np.zeros(7, dtype=np.float32),
    }
    with sv.session(policy, instruction="pick up the red cap and place it in the black box") as session:
        chunk = session.predict(inputs=inputs)
    print(chunk.actions)
    ```

    Save the code above, or download and run it:

    ```bash your computer theme={null}
    curl -fsSL https://api.orchestrallabs.ai/docs/downloads/first_prediction.py -o first_prediction.py
    python first_prediction.py
    ```

    Enter your saved deployment ID when prompted.

    Expect `15 × 7` action values. Random images and a zero state check connectivity; they are not useful robot observations. The model rejects a state outside the range its checkpoint declares, so use a real reading, not random state values.
    Servo handles model preprocessing. Servo does not apply them to hardware; your application owns sensor capture, action interpretation and hardware limits.
  </Step>

  <Step title="Inspect or stop the deployment">
    <Tabs>
      <Tab title="CLI">
        Inspect the deployment, then stop it:

        ```bash your computer theme={null}
        servo deployment show "$DEPLOYMENT_ID"
        servo deployment logs "$DEPLOYMENT_ID"
        servo deployment stop "$DEPLOYMENT_ID"
        servo deployment show "$DEPLOYMENT_ID"
        ```
      </Tab>

      <Tab title="Python">
        Inspect the deployment, then stop it:

        ```python stop_deployment.py theme={null}
        import servo

        sv = servo.Servo()
        deployment = sv.deployments.get(input("Deployment ID: "))
        print(deployment.status)
        deployment.delete()
        deployment.wait_retired(timeout_s=300)
        print(deployment.status)
        ```
      </Tab>
    </Tabs>

    Run the returned `DEPLOYMENT_ID=` assignment in your shell first. CLI `logs` prints authenticated dashboard links.
    `delete()` and `stop` request teardown; confirm `retired` through `wait_retired()` or repeated `show`.
    Closing Python or a session leaves the deployment running and capacity allocated.
  </Step>
</Steps>

For real sensors and action execution, continue to [your control loop](/guides/your-loop).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.