---
title: "Import Unsplash photo to Blob storage"
method: POST
path: "/api/v1/media/unsplash/import"
tags: ["unsplash"]
---

# Import Unsplash photo to Blob storage

`POST /api/v1/media/unsplash/import`

## Request

- Base URL: `https://slatehut.com`
- URL: `https://slatehut.com/api/v1/media/unsplash/import`
- Auth: HTTP bearer

Triggers the Unsplash download-tracking endpoint, stores an optimized copy on your Blob, and returns `{ url, alt, attribution }`. Per the Unsplash API license you MUST display `attribution.html` (or an equivalent link credit) wherever the imported image is shown. Body: `{ "photoId": "<id from search>" }`.

## Request body

- object
  - `photoId` string, required: Unsplash photo id from search results

## Response `200`

- object
  - `url` string, uri, required
  - `alt` string, required: Plain-text credit line suitable for `alt`.
  - `attribution` object, required: Display this on any page using the image. Unsplash license requires credit with links back to the photographer and Unsplash.
    - `photographerName` string, required
    - `photographerUrl` string, uri, required: Photographer profile URL with UTM params.
    - `unsplashUrl` string, uri, required: Unsplash home URL with UTM params.
    - `html` string, required: Pre-rendered HTML credit line.
    - `text` string, required: Pre-rendered plain-text credit line.

## Other responses

- `400`: Validation or conflict error
- `401`: Missing or invalid credentials
- `413`: Validation or conflict error
- `502`: Validation or conflict error
- `503`: Validation or conflict error

---

[API](https://skmtc.dev/slatehut/apis/slatehut-api.md) · [All operations](https://skmtc.dev/slatehut/apis/slatehut-api/llms.txt) · [OpenAPI document](https://skmtc.dev/slatehut/apis/slatehut-api/revisions/32dae277550c?raw)
