API 参考Media
Copy a file from a URL
Copy a JPEG, PNG, MP4 or MOV from a public URL into the media library; it is checked in the background
POST
Copy a JPEG, PNG, MP4 or MOV from a public URL into the media library; it is checked in the background
apiKeyheader
AuthorizationBearer <token>API key from Developer → API keys (gs_…). An unbound key takes the workspace from the X-Workspace header.
application/json- body
url*stringFormat
uriLength
length <= 2000file_name?stringLength
1 <= length <= 255Created
application/json- response
media*curl -X POST 'https://socmed.growpaces.com/api/v1/media/from-url' \ -H 'Content-Type: application/json' \ -d '{ "url": "http://example.com"}'Example Response201
{ "media": { "id": "string", "type": "image", "page_count": 0, "status": "pending", "original_name": "string", "mime_type": "string", "size_bytes": 0, "width": 0, "height": 0, "duration_ms": 0, "frame_rate": 0, "fail_reason": "string", "alt_text": "string", "keep": true, "used_in_posts": 0, "expires_at": "string", "url": "string", "created_at": "string" }}Complete an upload POST
Tell the server the upload finished (parts are joined first); the file is checked in the background
Create an upload link POST
A link that uploads files into the media library without an API key (for AI agents with a terminal): POST multipart field `file` (≤ 100 MB) or PUT the raw bytes with ?name= (any size up to the plan's limit). It works 30 minutes from its last use, at most 6 hours.