---
title: "Get registry credentials for pushing agent images"
method: GET
path: "/registry/auth"
tags: ["Registry"]
---

# Get registry credentials for pushing agent images

`GET /registry/auth`

Get short-lived credentials for pushing images to a namespace's registry.

    Each namespace has its own isolated registry repository. The token returned
    can ONLY push images to the specified namespace's repository.

    The CLI uses this endpoint to authenticate with Docker before pushing
    agent images. Returns a token valid for approximately 1 hour.

    **Usage with Docker:**
    ```bash
    docker login {registry_url} -u {username} -p {token}
    docker push {registry_url}/{repository}/{agent}:{tag}
    ```

## Query parameters

- `namespace` string, required — Target namespace slug for the image push

## Response `200`

Successful Response

- RegistryAuthResponse — Response containing short-lived registry credentials for pushing agent images.
  - `expires_at` string, date-time, required — Token expiration timestamp (typically ~1 hour from issuance)
  - `registry_url` string, required — Docker registry host URL (e.g., us-east4-docker.pkg.dev)
  - `repository` string, required — Repository path within the registry (e.g., project-id/agents)
  - `token` string, required — Short-lived OAuth2 access token for docker login
  - `username` string — Username for docker login (always 'oauth2accesstoken' for GCP)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/terminaluse/apis/sb0-api.md) · [All operations](https://skmtc.net/terminaluse/apis/sb0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/terminaluse/sb0-api/revisions/f24a474dc415/schema)
