# HTTP

## HTTP Integration

QuickSilver supports direct HTTP integration using curl or any HTTP client. This is ideal for low-level, language-agnostic setups and backend workflows.

### Usage with curl

```bash
curl -X POST "https://api-quicksilver.iotex.ai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      { "role": "system", "content": "You are a helpful assistant." },
      { "role": "user", "content": "Tell me about OpenAPI schemas." }
    ],
    "temperature": 0.7
  }'
```

### Request Format

* Method: `POST`
* URL: `https://api-quicksilver.iotex.ai/v1/chat/completions`

#### Headers:

* `Content-Type: application/json`
* `Authorization: Bearer your-api-key`

#### Request Body:

```json
{
  "model": "gpt-3.5-turbo",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Your question here"
    }
  ],
  "temperature": 0.7
}
```

### Tips

* Works with any HTTP client or programming language
* Fully compatible with OpenAI’s chat/completions API format
* Ideal for custom backend integrations or lightweight use cases
* Always include proper Authorization headers
* Do not expose your API key in client-side code or public repositories


---

# Agent Instructions: 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:

```
GET https://docs.iotex.io/quicksilver/developers/other-methods/http.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
