# Uploads

Get a signed URL to upload a file for use as a model input.

## POST /v1/uploads/url

Get upload URL

```bash
curl -H "x-api-key: $PHI_KEY" -X POST https://api.dynophi.com/v1/uploads/url \
  -H "content-type: application/json" \
  -d '{
  "filename": "<filename>"
}'
```

### Body

| Field | Type | Required | Default |
|---|---|---|---|
| filename | string | Required |  |
| content_type | string | Optional | "application/octet-stream" |
| expires_in | integer | Optional | 900 |

Returns 200 or 422.

### Complete request schema

```json
{
  "$ref": "#/$defs/UploadRequest",
  "$defs": {
    "UploadRequest": {
      "type": "object",
      "required": [
        "filename"
      ],
      "properties": {
        "filename": {
          "type": "string"
        },
        "content_type": {
          "type": "string",
          "default": "application/octet-stream"
        },
        "expires_in": {
          "type": "integer",
          "default": 900
        }
      }
    }
  }
}
```

### 200 response (application/json)

### 200 response fields and schema

```json
{
  "$ref": "#/$defs/UploadResponse",
  "$defs": {
    "UploadResponse": {
      "type": "object",
      "required": [
        "upload_url",
        "gcs_uri",
        "expires_in"
      ],
      "properties": {
        "upload_url": {
          "type": "string"
        },
        "gcs_uri": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer"
        }
      }
    }
  }
}
```

Illustrative response shape. Values are placeholders, not a recorded result.

```json
{
  "upload_url": "<value>",
  "gcs_uri": "<value>",
  "expires_in": 0
}
```


---
Source: https://dynophi.com/docs/api/uploads. From phi-api 0.2.2, 2026-11-23.
