# terminals.create()

Canonical URL: https://developers.iagenify.com/de/sdk/ref/compute/terminals/create/
Language: de

`api.compute.terminals.create({ storageId, name?, command?, by?, port? }) → Promise<ComputeTerminal>`

Create an isolated terminal. If `command` is supplied, it starts immediately and the terminal stays open after the command returns.

```javascript
const terminal = await api.compute.terminals.create({
  storageId: "YOUR_OBJECT_STORAGE_ID",
  name: "shell",
  command: "npm run dev",
  by: "user",
  port: 3000,
});
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `storageId` | string | required | Object Storage mounted at `/workspace`. |
| `name` | string |  | Optional display name; defaults to `shell`. |
| `command` | string|null |  | Optional first command to run. |
| `by` | string |  | Optional origin label recorded on the terminal; defaults to `user`. |
| `port` | integer|null |  | Optional port to expose for a preview. The terminal's `url` is null when no port is requested. |

The returned object contains the terminal ID and current state. Keep the ID private to the account that created it.

```python
terminal = api.compute.terminals.create(
    storage_id="YOUR_OBJECT_STORAGE_ID",
    name="shell",
    command="npm run dev",
    by="user",
    port=3000,
)
```
