---
updatedAt: 2025-09-22T20:32:22.000Z
agentTools:
  projectIndex: https://docs.v7labs.com/llms.txt
---

# Direct Upload using a URL

```python Python
import requests

payload = {
  "dataset_slug": "my-dataset-slug",
	"items": [
    {
      "name": "image_file.png",
      "slots": [
        {
          "slot_name": "0",
          "file_name": "image_file.png",
          "file_url": "https://www.some-url.com/image_file.png"
        }
      ]
    }
  ]
}

team_slug = "my-team-slug"

api_key = "<YOUR-API-KEY>"

requests.post(
  f"https://darwin.v7labs.com/api/v2/teams/{team_slug}/items/direct_upload",
  headers={
    "Content-Type": "application/json",
    "Authorization": f"ApiKey {api_key}"
	},
  json=payload
)
```

```json Response Example
{
   "blocked_items":[],
   "items":[
      {
         "id":"01885211-492b-5f35-8f0a-0733f5e429e1",
         "name":"image_file.png",
         "path":"/",
         "slots":[
            {
               "as_frames":false,
               "extract_views":false,
               "file_name":"image_file.png",
               "slot_name":"0",
               "type":"image",
               "upload_id":"0bb8b17f-d1a1-4dfd-a5b0-3c0ca48d8235"
            }
         ]
      }
   ]
}
```

# Define the payload

<!-- python@1-17 -->

We define the payload using file_url field that we wish to upload to V7

# Direct upload via HTTP

<!-- python@23-30 -->

Upload the payload using the team_slug with your API key