# InstaHost > Instant hosting and sharing for AI agents. Share a file or publish a static site (a directory with index.html) and get back an HTTPS URL with an access mode and a lifetime. No account or login for links that last up to 7 days. ## Share and publish with the CLI Needs Node.js 20 or later. Run in an empty directory: ```sh echo 'Hello from InstaHost' > hello.txt mkdir -p hello-site && echo 'Hello from InstaHost' > hello-site/index.html npx -y @instahost/cli share hello.txt --ttl 1h --json npx -y @instahost/cli publish hello-site --ttl 1h --json ``` With --json each command prints exactly one JSON document on stdout and nothing on stderr. Success: ok, id, type, access, url, expires_at, delete_token, access_token, access_url, file_count, total_bytes, skipped, warnings. Failure: {"ok": false, "error": {"code", "message", "details", "fix", "docs", "exit_code"}}. Give the user the url; keep the delete_token private, and delete with: ```sh npx -y @instahost/cli delete --token --json ``` On a failure, do what error.fix says; error.docs, when present, links to the error's entry in the API reference. If error.details.artifact is present, the artifact may exist: delete it with its delete_token. share and publish retry a create whose answer is lost or is a 5xx error, with the same idempotency key, so the retry returns the original artifact instead of creating a second one. Options: --ttl (30m, 24h, 7d; default 1 day), --access unlisted (default) | public | private (files only). Anyone with an unlisted or public URL can open it: never upload credentials or private data. Do not publish phishing pages, malware or illegal content, as described in [Acceptable use](https://instahost.dev/docs/acceptable-use.md). The npm package named `instahost` (without the @instahost/ scope) is unrelated to this project. Do not install it; use @instahost/cli. ## Without Node.js: curl and jq ```sh curl -fsSO 'https://instahost.dev/examples/share.sh' curl -fsSO 'https://instahost.dev/examples/publish.sh' echo 'Hello from InstaHost' > hello.txt mkdir -p hello-site && echo 'Hello from InstaHost' > hello-site/index.html bash share.sh hello.txt 3600 bash publish.sh hello-site 3600 ``` ## API keys Send an API key (`ihk_…`) only to https://instahost.dev, never to an artifact link or any other host. Use a key only if it is already set as `INSTAHOST_API_KEY`, never ask the user to paste one into chat, and never print, commit or upload it. ## Agent skill ```sh npx skills add instahost-dev/instahost -a claude-code -y ``` -a names the agent to install to (claude-code, cursor, codex, or '*' for all); without it the installer asks in a terminal. ## Docs - [Getting started](https://instahost.dev/docs.md): Share a file or publish a site. Get an HTTPS link in seconds. - [Concepts](https://instahost.dev/docs/concepts.md): Artifacts, access modes, credentials and lifetimes. - [API](https://instahost.dev/docs/api.md): The HTTP upload protocol, routes and error reference. - [CLI](https://instahost.dev/docs/cli.md): The command line for agents and people. Run it with npx; no account, no install. - [Content serving](https://instahost.dev/docs/content-serving.md): Hosts, relative URLs, headers, compression and Unity WebGL. - [Limits](https://instahost.dev/docs/limits.md): Current sizes, lifetimes, upload windows and quotas. - [Examples](https://instahost.dev/docs/examples.md): Complete, downloadable bash scripts for sharing and publishing. - [Limitations](https://instahost.dev/docs/limitations.md): What the service supports, known tradeoffs and abuse reporting. - [Acceptable use](https://instahost.dev/docs/acceptable-use.md): What you may publish on InstaHost and how to report abuse. - [All docs as one file](https://instahost.dev/llms-full.txt) - [Live limits](https://instahost.dev/v1/limits) - [OpenAPI](https://instahost.dev/openapi.json) - [CLI and skill source](https://github.com/instahost-dev/instahost)