Skip to main content

Publish an endpoint

This guide walks through creating, publishing, inspecting, updating, and unpublishing API Gateway endpoints.

Prerequisites

  • Access to a Crusoe AI Platform project.
  • Project administrator role is required to publish, modify, or delete endpoints.

Set API credentials in your environment:

export CAI_API="https://api.codyhill.dev"
export CAI_PROJECT="<your-project-id>"
export CAI_TOKEN="<your-api-key-or-session-token>"

1. Publish an endpoint

Publishing creates a public URL routing external traffic to your target workload.

platformctl gateway publish agent/research-buddy

Output:

url: https://research-buddy-jxszd4.apps.codyhill.dev
name: research-buddy
points at: agent research-buddy
access: open to anyone
state: ready

Publishing with flags:

platformctl gateway publish agent/research-buddy \
--name support-api \
--auth apikey \
--rate-limit 100/minute

2. Inspect active endpoints

View the status, public URL, and configuration of active endpoints.

List all endpoints in your project:

platformctl gateway endpoint list

Get detailed status for a single endpoint:

platformctl gateway endpoint get support-api

3. Update access settings

Modify security settings, rate limits, or IP allowlists on a live endpoint without downtime.

platformctl gateway endpoint update support-api \
--allow-cidr 203.0.113.0/24 \
--rate-limit 500/minute

To clear restrictions:

platformctl gateway endpoint update support-api --clear-allow-cidr --clear-rate-limit

4. Unpublish an endpoint

Unpublishing disables public access and takes the URL offline while reserving the address name and saving your key configurations.

platformctl gateway endpoint unpublish support-api

5. Delete an endpoint

Deleting permanently releases the public address name and removes associated API keys.

platformctl gateway endpoint delete support-api

Next steps