# Quickstart You need a morigraph account with credits. A new account starts with free credits, so you can try this before paying. [Create an account](https://morigraph.com/app?ref=docs-quickstart). ## 1. Get a key **In the dashboard.** Open [Developers](https://morigraph.com/app#/developers), name a key and create it. Copy it straight away: it is shown once. Only a workspace admin can create keys, because a key spends the workspace's shared credits. **Or from a terminal.** This prints a code, opens the dashboard, and stores the key once an admin approves: ```sh npx @morigraph/cli@latest login ``` Keep the key in an environment variable, never in source control: ```sh export MORIGRAPH_API_KEY=mg_sk_live_... ``` ## 2. Check it works This costs nothing: ```sh curl https://api.morigraph.com/v1/me \ -H "Authorization: Bearer $MORIGRAPH_API_KEY" ``` ## 3. See what you can call ```sh curl https://api.morigraph.com/v1/tools \ -H "Authorization: Bearer $MORIGRAPH_API_KEY" ``` Each tool comes with its price in credits and a JSON Schema for its arguments. ## 4. Call a tool The request body is the tool's arguments. ```sh curl https://api.morigraph.com/v1/tools/web_search \ -H "Authorization: Bearer $MORIGRAPH_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"query": "best practices for rate limiting an API", "num_results": 3}' ``` ```json { "request_id": "4a1c...", "tool": "web_search", "status": "completed", "output": { "text": "1. ...", "data": null }, "job": null, "credits": { "charged": 0.14, "reserved": 0, "remaining": 4.86 } } ``` `output.text` is the answer. `output.data` carries the same facts as JSON when the tool provides them, for example the URL of a generated image. `credits.charged` is what this call cost. The same call from the command line: ```sh morigraph call web_search --arg query="best practices for rate limiting an API" --arg num_results=3 ``` ## 5. Longer jobs Video generation takes minutes. The call answers at once with HTTP 202 and a job, and you check the job until it is done. Checking is free. ```sh curl https://api.morigraph.com/v1/jobs/JOB_ID \ -H "Authorization: Bearer $MORIGRAPH_API_KEY" ``` From the command line, `--wait` does the checking for you: ```sh morigraph call video_gen --json-args '{"prompt": "a paper boat on a calm lake"}' --wait ``` ## Next - Giving this to a coding agent? Point it at [For AI agents](https://morigraph.com/docs/agents.md). - [Tools](https://morigraph.com/docs/tools.md) lists every argument. - [Errors and limits](https://morigraph.com/docs/errors.md) says what each failure means and what to do. --- Canonical page: https://morigraph.com/docs/quickstart/ Updated: 2026-11-11 All developer docs: https://morigraph.com/docs.md · For AI agents: https://morigraph.com/docs/agents.md · OpenAPI: https://api.morigraph.com/openapi.json · Site overview: https://morigraph.com/llms.txt