Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

Unsplash Photo Search

https://api.sandbase.ai/v1/api/unsplash/search-photos

Search Unsplash for free stock photos by keyword. Returns image URLs in several sizes, dimensions, alt text, the photographer's name and profile, and the photo's Unsplash page.

料金
$0.0033 からUSD / 回
メソッド
POST
レスポンス
JSON
パラメータ
必須 1 件 · 任意 4 件

プレイグラウンド

入力
Keyword or phrase to search Unsplash photos for, e.g. "coffee" or "minimal workspace".
Only return photos with this dominant color tone. Omit for any color.
120
Maximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less. 範囲: 1 から 20 まで。
Order results by best match (relevant, the default) or newest first (recent).
Only return photos with this orientation. Omit for any orientation.
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

API README

Unsplash Photo Search API

Search Unsplash for free stock photos by keyword. Returns image URLs in several sizes, dimensions, alt text, the photographer's name and profile, and the photo's Unsplash page.

Request

curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "unsplash/search-photos", "limit": 2, "query": "coffee"}'

The result is returned in outputs[0].data. Lookups that find nothing fail with a not-found error.

Parameters

NameTypeRequiredDescription
querystringYesKeyword or phrase to search Unsplash photos for, e.g. "coffee" or "minimal workspace".
colorstringNoOnly return photos with this dominant color tone. Omit for any color. One of: black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue.
limitintegerNoMaximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less.
orientationstringNoOnly return photos with this orientation. Omit for any orientation. One of: landscape, portrait, square.
sortBystringNoOrder results by best match (relevant, the default) or newest first (recent). One of: relevant, recent.

Pricing

Billed at the actual cost of each call: about $0.00165 per result returned, up to $0.0336 per request (about $0.0033 for the request above). A call can cost more when the first data source fails and another one answers. Failed calls and lookups that find nothing are not charged.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
Unsplash1回あたり $0.0033 からJSON

質問

FAQ

Unsplash Photo Search API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/unsplash/search-photos に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Unsplash Photo Search API の料金はいくらですか?

1回あたり $0.0033 から、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

Unsplash Photo Search API はどのパラメータを受け付けますか?

必須: query (string)。 任意: color(black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue のいずれか), limit (integer), sortBy(relevant, recent のいずれか) と orientation(landscape, portrait, square のいずれか)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

Unsplash Photo Search API は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。

Unsplash の開発者アカウントまたは API key は必要ですか?

いいえ。Unsplash Photo Search は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Unsplash の API アクセスを別途申請する必要はありません。