KeyAPI CLI

Make KeyAPI easier to use from the command line

KeyAPI CLI is a lightweight command line tool for the KeyAPI platform. It brings API discovery, endpoint inspection, parameter review, and API execution into a single keyapi command, so developers and AI agents can call Google, TikTok, Instagram, and other platform APIs without writing HTTP request code manually.

Usage Guide

Install KeyAPI CLI

Install KeyAPI CLI

Use the README for full installation details. The examples below keep the practical workflow and copyable prompts for AI assistants: discover endpoints, inspect schemas, dry-run requests, then execute API calls.

01

Install from GitHub Releases

Ask your AI to download the right binary for your operating system, make `keyapi` available on PATH, and verify the installation.

Help me install KeyAPI CLI from https://github.com/EchoSell/keyapi-cli/releases. Download the correct binary for my current operating system, configure it so the keyapi command is available from the terminal, and verify the installation by running keyapi --help and keyapi --version.

02

Build from source

If you prefer source builds, ask your AI to check Go, clone the repository, build the executable, and add it to PATH.

Help me install KeyAPI CLI from source: https://github.com/EchoSell/keyapi-cli.git. Check that Go 1.22 or later is available, clone the repository, build the executable for my current operating system, add the keyapi command to PATH, and verify the installation by running keyapi --help and keyapi --version.

03

Quick start workflow

Configure your token, show the current configuration, list platforms, inspect endpoints, check schema, dry-run, then execute.

keyapi set token sk_xxx keyapi show keyapi spec list-platforms keyapi spec list-endpoints google keyapi schema google/search keyapi call "/v1/google/search?q=openai&gl=us&hl=en" --dry-run keyapi call "/v1/google/search?q=openai&gl=us&hl=en"

Common KeyAPI CLI commands

Understand the CLI

keyapi --help

Show command purposes, arguments, output structure, common response codes, and examples.

Configure your KeyAPI token

keyapi set token sk_xxx

Save your KeyAPI token locally so later requests can reuse it.

List supported platforms

keyapi spec list-platforms

Return available platforms such as Google, TikTok, Instagram, YouTube, and more.

List platform endpoints

keyapi spec list-endpoints google

Inspect endpoint summaries under one platform before choosing the right API.

Inspect endpoint details

keyapi schema google/search

Check method, path, description, parameters, and body_fields before calling.

Preview and execute requests

keyapi call "..." --dry-run

Use `--dry-run` to inspect the final request, then execute the API call after confirming it.

Usage Guide

Recommended Workflow

Prompts you can give to an AI assistant

01

Rules for AI assistants

Give this prompt to your AI so it follows discovery and schema checks instead of guessing endpoint paths or exposing secrets.

I have installed KeyAPI CLI and the keyapi command is available. First run keyapi --help to understand the CLI. Then, based on my task, use keyapi spec list-platforms, keyapi spec list-endpoints <platform>, and keyapi schema <endpoint-or-path> to choose the right endpoint. Before sending a request, use --dry-run to preview it. After confirming the request, execute it with keyapi call. Do not guess endpoint paths, inspect schema before calling, and do not reveal my API key in your response.

02

Research creator video trends

Ask your AI to choose the right platform and endpoint, call KeyAPI, and turn the raw response into a trend report.

Use KeyAPI CLI to look up the recent video trend performance for IShowSpeed, collect the hottest video links, and summarize views, engagement, and publish time for each video. If multiple endpoints are needed, explain the call plan before executing requests.

03

Example: Google Search

A complete example of endpoint discovery, schema inspection, dry-run, and request execution.

keyapi spec list-endpoints google keyapi schema google/search keyapi call "/v1/google/search?q=openai&gl=us&hl=en" --dry-run keyapi call "/v1/google/search?q=openai&gl=us&hl=en"

One workflow for discovery, schema inspection, and API execution

One API execution entry point

Use `keyapi call` to execute KeyAPI requests with endpoint aliases, /v1 paths, or full URLs.

Discoverable endpoint catalog

Use `spec` commands to list supported platforms and inspect the endpoints available under each platform.

Endpoint schema inspection

Use `schema` to inspect endpoint method, path, summary, description, parameters, and body_fields.

JSON-friendly output

`spec` and `call` return JSON by default, making the CLI easy to use from terminals, scripts, CI jobs, and AI agents.

Request preview before execution

Use `--dry-run` to inspect the final request without sending it, reducing wrong parameters and accidental calls.

Save large responses to files

Use `--output` to save large JSON responses such as product details, image lists, SKU lists, or long description blocks.

AI-assistant friendly

`--help`, `spec`, `schema`, and `call` give AI assistants a clear path to discover, inspect, preview, and execute requests.

Why KeyAPI CLI

A practical workflow for debugging, scripts, and AI assistants

KeyAPI CLI reduces repetitive request code and makes endpoint debugging and scripting easier. For AI coding assistants such as Claude Code, Codex, Cursor, Trae, and similar tools, it provides a self-describing workflow: inspect keyapi --help, discover endpoints with spec, confirm parameters with schema, preview requests with --dry-run, then execute API calls.

Call KeyAPI endpoints quickly without writing HTTP request code.

Let AI assistants use help, spec, schema, and call to understand and execute requests.

Inspect endpoint schemas before calling APIs to avoid guessing paths or parameters.

Use --dry-run for request preview and --output for large JSON responses.