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

# Usage

Once you have your API key, you can start running AI inference jobs using Lilypad's Anura API. Below is a simple **"Hello World"** example to get started.

### Get Available Models

Before running a job, check which models are supported:

```bash
curl -X GET "https://anura-testnet.lilypad.tech/api/v1/models" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Run a Job

Use the API to send a simple chat completion request using one of the available models:

```bash
curl -X POST "https://anura-testnet.lilypad.tech/api/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "MODEL_NAME:MODEL_VERSION",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful AI assistant"
      },
      {
        "role": "user",
        "content": "What order do frogs belong to?"
      }
    ],
    "temperature": 0.6
  }'
```

Replace `"MODEL_NAME:MODEL_VERSION"` with the model you want to use from the previous step.

### Retreive Job Results

You can check the status of your job and retrieve outputs using the job ID:

```bash
curl -X GET "https://anura-testnet.lilypad.tech/api/v1/jobs/{job_id}" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

This will return details on whether the job is still processing or has completed.

For more advanced usage, including streaming completions, multi-turn conversations, and additional endpoints, check out the [inference API Documentation](https://docs.lilypad.tech/lilypad/developer-resources/inference-api).


---

# 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.lilypad.tech/lilypad/quickstart/inference-api/usage.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.
