# GrapeQRAPI リファレンス

#### QRコード生成API

このAPIを使用すると、指定したURLに基づいてQRコードを生成できます。以下のフォーマットでリクエストを送信してください：

```
https://grape.mixeder.net/qrapi/output.png?url=YOUR_URL
```

例えば、次のようにリクエストを送信することで、QRコードを生成できます：

```
https://grape.mixeder.net/qrapi/output.png?url=https://mxsl.net/YF3vm580w
```

このリクエストを実行すると、指定したURLに基づくQRコード画像が生成されます。

***

### サンプルコード

#### **Curl**

```bash
curl -o qr_code.png "https://grape.mixeder.net/qrapi/output.png?url=https://mxsl.net/YF3vm580w"
```

***

#### **Node.js**

```javascript
const https = require('https');
const fs = require('fs');

const url = 'https://grape.mixeder.net/qrapi/output.png?url=https://mxsl.net/YF3vm580w';
const file = fs.createWriteStream('qr_code.png');

https.get(url, (response) => {
  response.pipe(file);
  file.on('finish', () => {
    console.log('QRコードが生成されました: qr_code.png');
  });
}).on('error', (err) => {
  console.error('エラー:', err);
});
```

***

#### **Python**

```python
import requests

url = "https://grape.mixeder.net/qrapi/output.png?url=https://mxsl.net/YF3vm580w"
response = requests.get(url)

if response.status_code == 200:
    with open("qr_code.png", "wb") as f:
        f.write(response.content)
    print("QRコードが生成されました: qr_code.png")
else:
    print("エラー:", response.status_code)
```

***

これらのコードを使用することで、指定したURLのQRコードを簡単に生成・取得できます。


---

# 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://developer.mixeder.net/grapeapi/apirifarensu/grapeqrapi-rifarensu.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.
