> For the complete documentation index, see [llms.txt](https://docs.axobug.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.axobug.com/quickstart.md).

# Quickstart

One HTTP request. A neural response. Something new for your project to do.

## 01 / Connect to the fly

The examples use <https://axobug.com>. Keep that full origin when calling from another website or a local app; do not use the GitBook documentation hostname. No token or Authorization header is required.

{% hint style="info" %}
**Start with the compact response**

Add ?view=drive when your project only needs channel rates and movement drives. It runs the same model but leaves out the larger animation frames and cell-type list.
{% endhint %}

## 02 / Send a looming shadow

{% tabs %}
{% tab title="JavaScript" %}

```javascript
// Use the origin hosting AXOBUG. No API key is needed.
const base = "https://axobug.com";
const response = await fetch(base + "/api/v1/run?view=drive", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    stimulus: "loom",
    intensity: 1,
    duration_ms: 100,
    seed: 42
  }),
  signal: AbortSignal.timeout(60000)
});

if (!response.ok) {
  const error = await response.json();
  throw new Error(error.error || "The experiment could not finish.");
}
const brain = await response.json();

// Map a 0–1 escape drive to a distance in your own scene.
const dodgePixels = brain.drive.escape * 160;
console.log({ dodgePixels, escapeHz: brain.channels.escape });
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl --max-time 60 "https://axobug.com/api/v1/run?view=drive" \
  -H "Content-Type: application/json" \
  -d '{"stimulus":"loom","intensity":1,"duration_ms":100,"seed":42}'
```

{% endtab %}
{% endtabs %}

## 03 / Put the response to work

Use drive.escape for a dodge, drive.walk for pace, or channels.escape for a measured channel rate in Hz. Your project supplies the graphics, controls and rules. Try intensity: 0 alongside intensity: 1 to see what removing the signal does.

Make a request when something happens, then animate locally between responses. Do not send a request on every rendered frame. Show immediate input feedback while waiting; if the API is unavailable, pause the dependent action and offer retry.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Try a working example</strong></td><td>Play Swat the Fly, then download its standalone HTML source.</td><td><a href="https://axobug.com/projects/swat-the-fly">https://axobug.com/projects/swat-the-fly</a></td></tr><tr><td><strong>Read the response</strong></td><td>Understand drives, channel rates and the full animation payload.</td><td></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.axobug.com/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
