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

# Create a GPU Node

> Register a new GPU node in Aria Compute PIN by providing SSH credentials, labels, and a hardware spec.

Register a new GPU node so Aria Compute PIN can manage agents on it. Provide SSH connection details and an optional spec and label set. The node is created with status active.

## Endpoint

**POST** `/v1/gpu-nodes`

Authorization: Bearer API key required.

## Request body

<ParamField body="name" type="string" required>
  Human-readable node name.
</ParamField>

<ParamField body="ip" type="string" required>
  Node IP address for SSH access.
</ParamField>

<ParamField body="ssh_user" type="string" required>
  SSH username.
</ParamField>

<ParamField body="ssh_port" type="integer">
  SSH port (defaults to 22).
</ParamField>

<ParamField body="ssh_key" type="string">
  SSH private key (plaintext, encrypted before storage).
</ParamField>

<ParamField body="ssh_password" type="string">
  SSH password (plaintext, encrypted before storage).
</ParamField>

<ParamField body="spec" type="string">
  Hardware spec summary.
</ParamField>

<ParamField body="labels" type="array of strings">
  Scheduling labels.
</ParamField>

## Response

<ResponseField name="code" type="integer">
  Response code (0 for success).
</ResponseField>

<ResponseField name="data" type="object" required>
  The created GPU node object.

  <Expandable>
    <ResponseField name="id" type="string" required>
      Node identifier, e.g. gn\_abc123de.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Node name.
    </ResponseField>

    <ResponseField name="ip" type="string" required>
      Node IP.
    </ResponseField>

    <ResponseField name="ssh_port" type="integer">
      SSH port.
    </ResponseField>

    <ResponseField name="ssh_user" type="string" required>
      SSH username.
    </ResponseField>

    <ResponseField name="spec" type="string">
      Spec summary.
    </ResponseField>

    <ResponseField name="labels" type="array of strings">
      Labels.
    </ResponseField>

    <ResponseField name="status" type="string">
      Created status, e.g. active.
    </ResponseField>

    <ResponseField name="created_at" type="string (ISO 8601)">
      Creation timestamp.
    </ResponseField>

    <ResponseField name="updated_at" type="string (ISO 8601)">
      Update timestamp.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="message" type="string">
  Empty on success.
</ResponseField>

## Example

```bash theme={null}
curl -s -X POST http://<pin-host>:8001/v1/gpu-nodes \
  -H "Authorization: Bearer $ARIA_PIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "node-01",
    "ip": "10.0.1.10",
    "ssh_user": "ubuntu",
    "ssh_port": 22,
    "ssh_key": "-----BEGIN OPENSSH PRIVATE KEY-----\n...",
    "spec": "A100-80G x8",
    "labels": ["training", "a100"]
  }'
```

```json theme={null}
{
  "code": 0,
  "data": {
    "id": "gn_a1b2c3d4",
    "name": "node-01",
    "ip": "10.0.1.10",
    "ssh_port": 22,
    "ssh_user": "ubuntu",
    "spec": "A100-80G x8",
    "labels": ["training", "a100"],
    "status": "active",
    "created_at": "2024-05-01T12:00:00Z",
    "updated_at": "2024-05-01T12:00:00Z"
  },
  "message": ""
}
```


## Related topics

- [Delete a GPU Node](/api-reference/pin/gpu-nodes/delete.md)
- [Get a GPU Node](/api-reference/pin/gpu-nodes/get.md)
- [Update a GPU Node](/api-reference/pin/gpu-nodes/update.md)
- [List GPU Nodes](/api-reference/pin/gpu-nodes/list.md)
- [Node Agent Heartbeat](/api-reference/pin/node-agent/heartbeat.md)
