Prepare an automatic image upload
request_uploadPrepare a signed URL for automatically uploading a readable attachment. Free; no card.
If the host supplies image_files, pass them directly to estimate_study/run_study instead.
Otherwise, when you can read the attached file (e.g. Codex or Claude Code), run curl_command
with <PATH_TO_IMAGE> replaced by its actual path. Do not ask the user to select it again.
This call only creates a link: received=false means the image has NOT arrived. Only report
success after the upload returns ok=true with this ref and received=true; if the response
is lost, GET status_url and check received before retrying. Then pass ref as image_refs.
A ref with no image is refused without charging.
Read if_upload_fails for recovery. If automatic transfer is unavailable or failed, use
request_manual_upload for a card, or offer manual_upload_url to keep the same ref. Never
claim a network failure is specific to a client you have not identified.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | What the image is, in a few words, e.g. 'Spring sale banner, version B' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | false means the call failed: read `error` and `hint` | |
| ref | No | Pass as image_refs once the image has arrived | |
| hint | No | What to change, when ok is false | |
| next | No | What to do next | |
| note | No | Something to tell the user or keep in mind | |
| error | No | Error code, when ok is false | |
| received | No | false until the image has arrived | |
| max_bytes | No | ||
| status_url | No | GET to check `received` | |
| upload_url | No | ||
| curl_command | No | Run with <PATH_TO_IMAGE> replaced | |
| upload_state | No | ||
| accepted_types | No | ||
| if_upload_fails | No | Read before sending anything | |
| manual_upload_url | No | For a person to upload in a browser | |
| expires_in_seconds | No |