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

# API and command line

> Upload data and train from your own code.

Model calls use a key from **Keys** ([quickstart](https://docs.os3compute.com/quickstart.md)). Everything else the portal does, such as uploading data and starting training, is an API:

| | |
| - | - |
| Address | `https://api.os3compute.com` |
| Key | **Settings → API keys**, sent as `Authorization: Bearer os3_...` |
| Reference | [api.os3compute.com/docs](https://api.os3compute.com/docs): every call, field and error |
| Retries | Send an `Idempotency-Key` header when you start training: a retry with the same key never starts a second run. |

```bash theme={null}
curl https://api.os3compute.com/workspaces \
  -H "Authorization: Bearer $OS3_API_KEY"
```

## Command line

`os3` makes the same calls. Install the files listed at [api.os3compute.com/downloads](https://api.os3compute.com/downloads) with `pip`, then:

```bash theme={null}
export OS3_API_URL=https://api.os3compute.com
export OS3_API_KEY="os3_..."
os3 --help
```


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