Docs Guides
Guide

Image Host API

Image / video APIs often require a **publicly reachable image URL**. The console (and some samples) upload a local file to a separate image-host service, then pass the returned URL into business APIs.

Image / video APIs often require a publicly reachable image URL. The console (and some samples) upload a local file to a separate image-host service, then pass the returned URL into business APIs.

Relationship to the business gateway

ItemNote
Business callsChat / image / video use the site Base URL + sk- API key
Image uploadNot a route inside new--api; defaults to an external imageproxy
Docs pageSee System → Account & Tokens → “Upload image” (POST /api/upload)

Default console upload URL:

https://imageproxy.zhongzhuan.chat/api/upload
json

(Source constant: IMAGEPROXY_UPLOAD_URL.)

Example request

curl -X POST 'https://imageproxy.zhongzhuan.chat/api/upload' \ -H "Authorization: Bearer sk-YOUR_KEY" \ -F 'file=@./demo.png'
json
  • Content-Type: multipart/form-data
  • Form field: file
  • Auth: Bearer (follow the image-host service; the console usually sends the business key)

On success, use the returned public URL (field names depend on the service) in parameters such as image-to-video or reference images.

Notes

  1. Do not mix with token CRUD: /api/token* uses the business gateway with session / access_token; the image host is a different service.
  2. URL lifetime: some hosts return temporary URLs; expired links cause upstream fetch failures — store important assets yourself.
  3. Size / format: oversized or non-image MIME types may fail; compress to the limits of the target API.
  4. Privacy: uploads may be fetched publicly — do not upload sensitive originals.