Import a Hosted App file from a URL
import_app_fileA ChatGPT user can attach the file, or point at one ChatGPT made. Another client can pass any public https URL as file.download_url, with any file_id. The server fetches that URL once over HTTPS and stages the bytes, replacing the path. Then publish as usual. The area belongs to this project, publisher and slug; a taken slug you cannot manage is refused with slug_unavailable. See request_app_upload_url for shared upload limits, chunking, expiry and staging lifecycle rules.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"slug": "<slug>",
"path": "<path>",
"file": "<file>"
},
"name": "import_app_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| path | Yes | Relative file path | |
| slug | Yes | 1–64 lowercase letters, digits and internal hyphens; an app need not exist yet | |
| content_type | No | Type inferred from extension when omitted. For a recognized extension, explicit content_type must match; otherwise an explicit allowed content_type is required. Allowed types (extension: content_type): .cjs: text/javascript; .css: text/css; .csv: text/csv; .gif: image/gif; .htm: text/html; .html: text/html; .ico: image/x-icon; .jpeg: image/jpeg; .jpg: image/jpeg; .js: text/javascript; .json: application/json; .md: text/markdown; .mjs: text/javascript; .otf: font/otf; .pdf: application/pdf; .png: image/png; .svg: image/svg+xml; .ttf: font/ttf; .txt: text/plain; .wasm: application/wasm; .webp: image/webp; .woff: font/woff; .woff2: font/woff2. PDFs are served as downloads: an app fetches their bytes to process them, and they cannot be shown inline. |