# Endpoints ของ models และ credits: GET /models และ GET /credits

> GET /api/v1/models แสดงรายการ model id ที่ API key ของคุณเรียกได้; GET /api/v1/credits คืนเครดิตที่เหลือ เอกสารอ้างอิงและตัวอย่างของ 12 โมเดล open-weight

- URL: https://llmwithcrypto.com/th/docs/models/
- อัปเดตล่าสุด: 2026-10-23
- ผู้เผยแพร่: LLMwithCrypto (https://llmwithcrypto.com)

endpoint อ่านอย่างเดียวเล็ก ๆ สองตัว ตัวหนึ่งแสดงรายการโมเดลที่ใส่ในฟิลด์ `model` ได้ อีกตัวบอกว่าเหลือเครดิตเท่าไรก่อนแอปของคุณจะหมด ทั้งคู่ไม่มีค่าใช้จ่าย

**คำตอบสั้น — จะแสดงรายการโมเดลและเช็กเครดิตบน LLMwithCrypto ได้อย่างไร**

เรียก `GET https://llmwithcrypto.com/api/v1/models` เพื่อดูรายการ model id ในรูปแบบ OpenAI และ `GET https://llmwithcrypto.com/api/v1/credits` เพื่อดูเครดิตที่เหลือเป็นดอลลาร์สหรัฐ ทั้งคู่รับ API key ของคุณเป็น Bearer token และใช้ฟรี ณ วันที่ 23 ตุลาคม 2026 **LLMwithCrypto** ให้บริการ 12 โมเดล open-weight ตั้งแต่ DeepSeek V4 Pro ถึง Mistral Small 4

## แสดงรายการโมเดล

`GET /api/v1/models`

คืนรายการโมเดลที่ API key ของคุณเรียกได้ ในรูปแบบรายการของ OpenAI `id` คือค่าที่ต้องส่งในฟิลด์ `model` ของ chat completion ตัวอย่างแสดงสี่รายการแรก `created` เป็นเพียงตัวอย่าง

การยืนยันตัวตน: API key ใน header `Authorization: Bearer API_KEY`

**Response** `200`

```json
{
  "object": "list",
  "data": [
    {
      "id": "deepseek-v4-pro",
      "object": "model",
      "created": 1792742400,
      "owned_by": "deepseek"
    },
    {
      "id": "deepseek-v4.1-flash",
      "object": "model",
      "created": 1792742400,
      "owned_by": "deepseek"
    },
    {
      "id": "deepseek-r1",
      "object": "model",
      "created": 1792742400,
      "owned_by": "deepseek"
    },
    {
      "id": "qwen3.5-397b-a17b",
      "object": "model",
      "created": 1792742400,
      "owned_by": "qwen"
    }
  ]
}
```

*curl*

```bash
curl -s "https://llmwithcrypto.com/api/v1/models" \
  -H "Authorization: Bearer $LLMWITHCRYPTO_API_KEY"
```

*Python*

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://llmwithcrypto.com/api/v1",
    api_key=os.environ["LLMWITHCRYPTO_API_KEY"],
)
for model in client.models.list():
    print(model.id, model.owned_by)
```

*Node.js*

```javascript
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://llmwithcrypto.com/api/v1',
  apiKey: process.env.LLMWITHCRYPTO_API_KEY,
});
for await (const model of client.models.list()) console.log(model.id, model.owned_by);
```

## อ่านเครดิตที่เหลือ

`GET /api/v1/credits`

คืนเครดิตในบัญชีของคุณเป็นดอลลาร์สหรัฐ ในรูปสตริงทศนิยมเพื่อไม่ให้สูญเสียความแม่นยำ พร้อมเวลาที่อัปเดตล่าสุด การเรียกไม่มีค่าใช้จ่าย ตัวเลขเป็นเพียงตัวอย่าง

การยืนยันตัวตน: API key ใน header `Authorization: Bearer API_KEY`

**Response** `200`

```json
{
  "object": "credits",
  "balance_usd": "41.2731",
  "currency": "USD",
  "updated_at": "2026-10-23T09:41:07Z"
}
```

*curl*

```bash
curl -s "https://llmwithcrypto.com/api/v1/credits" \
  -H "Authorization: Bearer $LLMWITHCRYPTO_API_KEY"
```

*Python*

```python
import os

import requests

resp = requests.get(
    "https://llmwithcrypto.com/api/v1/credits",
    headers={"Authorization": "Bearer " + os.environ["LLMWITHCRYPTO_API_KEY"]},
    timeout=30,
)
resp.raise_for_status()
print("credit left:", resp.json()["balance_usd"], "USD")
```

*Node.js*

```javascript
const res = await fetch('https://llmwithcrypto.com/api/v1/credits', {
  headers: { Authorization: `Bearer ${process.env.LLMWITHCRYPTO_API_KEY}` },
});
const credits = await res.json();
console.log('credit left:', credits.balance_usd, 'USD');
```

## ฉันใช้ model id อะไรได้บ้าง?

ค่า `model`, จุดเด่นของโมเดล และ context window ของมัน ข้อมูล ณ วันที่ 23 ตุลาคม 2026 ราคาต่อล้านโทเคนอยู่ที่ [หน้าราคา](https://llmwithcrypto.com/th/pricing/)

| Model id | โมเดล | Context | Input / 1M | Output / 1M |
| --- | --- | --- | --- | --- |
| `deepseek-v4-pro` | [DeepSeek V4 Pro](https://llmwithcrypto.com/th/models/deepseek-v4-pro/) | 1M | $1.254 | $3.762 |
| `deepseek-v4.1-flash` | [DeepSeek V4.1 Flash](https://llmwithcrypto.com/th/models/deepseek-v4-1-flash/) | 1M | $0.285 | $1.14 |
| `deepseek-r1` | [DeepSeek R1](https://llmwithcrypto.com/th/models/deepseek-r1/) | 160K | $0.57 | $2.208 |
| `qwen3.5-397b-a17b` | [Qwen3.5 397B A17B](https://llmwithcrypto.com/th/models/qwen3-5-397b-a17b/) | 256K | $0.57 | $3.42 |
| `qwen3-235b-a22b-instruct-2507` | [Qwen3 235B A22B Instruct](https://llmwithcrypto.com/th/models/qwen3-235b-a22b-instruct-2507/) | 256K | $0.161 | $0.57 |
| `gpt-oss-120b` | [gpt-oss-120b](https://llmwithcrypto.com/th/models/gpt-oss-120b/) | 128K | $0.142 | $0.57 |
| `gpt-oss-20b` | [gpt-oss-20b](https://llmwithcrypto.com/th/models/gpt-oss-20b/) | 128K | $0.033 | $0.161 |
| `glm-4.7` | [GLM-4.7](https://llmwithcrypto.com/th/models/glm-4-7/) | 200K | $0.57 | $2.09 |
| `llama-3.3-70b-instruct` | [Llama 3.3 70B Instruct](https://llmwithcrypto.com/th/models/llama-3-3-70b-instruct/) | 128K | $0.209 | $0.475 |
| `gemma-4-31b` | [Gemma 4 31B](https://llmwithcrypto.com/th/models/gemma-4-31b/) | 256K | $0.19 | $0.38 |
| `mistral-large-3` | [Mistral Large 3](https://llmwithcrypto.com/th/models/mistral-large-3/) | 256K | $0.475 | $1.424 |
| `mistral-small-4` | [Mistral Small 4](https://llmwithcrypto.com/th/models/mistral-small-4/) | 256K | $0.142 | $0.57 |

## แอปของฉันควรอ่านรายการโมเดลตอนเริ่มทำงานไหม?

เป็นนิสัยที่ดี โมเดลถูกเพิ่มเข้ามา และถูกปลดระวาง (ซึ่งเกิดน้อยกว่า) ทุกการเปลี่ยนแปลงมีวันที่กำกับใน [changelog](https://llmwithcrypto.com/th/changelog/) การอ่าน `GET https://llmwithcrypto.com/api/v1/models` ตอนที่แอปเริ่มทำงานช่วยให้ตรวจได้ว่า id ที่ตั้งค่าไว้ยังมีอยู่จริง แทนที่จะรู้ตัวจาก `404 model_not_found` ในโปรดักชัน

รายการนี้มีเฉพาะโมเดลแบบ open-weight เท่านั้น เฉพาะโมเดล open-weight ที่สัญญาอนุญาตให้บริการเป็น API ได้: DeepSeek, Qwen, gpt-oss, Mistral, Llama, Gemma และอื่น ๆ ที่ระบุไว้ในหน้า models เราเรียกใช้โมเดลเหล่านี้บน GPU ที่เราเช่าและดูแลเอง. แต่ละโมเดลมี licence และนโยบายการใช้งานของตัวเอง (เช่น Llama Acceptable Use Policy ของ Meta และข้อความ “Built with Llama”); การใช้โมเดลผ่านเราหมายถึงคุณยอมรับสิ่งเหล่านั้น.

## ทำอย่างไรไม่ให้เครดิตหมด?

- **อ่านยอดคงเหลือเป็นประจำ** `GET https://llmwithcrypto.com/api/v1/credits` ฟรี การเช็กทุกชั่วโมงหรือหลังแต่ละ batch ก็เพียงพอสำหรับแอปส่วนใหญ่
- **ตั้งเพดานของคุณเอง** เมื่อ `balance_usd` ลดต่ำกว่าค่าที่คุณกำหนด ให้แจ้งเตือนตัวเองและเติมเครดิตก่อนที่การเรียกจะเริ่มล้มเหลว
- **จัดการ `402`** การเรียกที่เครดิตจ่ายไม่พอจะตอบกลับเป็น `402 insufficient_balance` และไม่มีค่าใช้จ่าย [หน้าข้อผิดพลาด](https://llmwithcrypto.com/th/docs/errors/) แสดงวิธีรับมือ

เครดิตไม่มีวันหมดอายุ: สิ่งที่คุณไม่ได้ใช้ในเดือนนี้ยังอยู่ให้ใช้ในปีหน้า ดังนั้นการเติมเครดิตแต่เนิ่น ๆ จึงไม่มีค่าใช้จ่าย

## โมเดลและเครดิต: คำถามที่พบบ่อย

### ทำไม GPT หรือ Claude ไม่อยู่ในรายการ?

เราไม่ขายการเข้าถึง GPT, Claude, Gemini หรือ Grok: ผู้ผลิตห้ามขายต่อการเข้าถึง API โดยไม่ได้รับอนุมัติจากพวกเขา และเราไม่ได้รับอนุมัติดังกล่าว.

### รายการโมเดลแสดงราคาด้วยไหม?

ไม่ มันใช้รูปแบบ OpenAI ราคาต่อล้านโทเคนอยู่ที่ [หน้าราคา](https://llmwithcrypto.com/th/pricing/) และในหน้าโมเดลแต่ละตัว

### เครดิตใช้ร่วมกันระหว่าง API key ของฉันไหม?

ใช่ API key ขึ้นกับบัญชี และทั้งหมดใช้เครดิตก้อนเดียวกัน สร้าง API key หนึ่งอันต่อแอป เอเจนต์ หรือเพื่อนร่วมทีม แล้วเพิกถอนอันใดก็ได้จากแดชบอร์ดโดยไม่กระทบอันอื่น.

---

LLMwithCrypto: LLMwithCrypto คือ LLM API ที่เข้ากันได้กับ OpenAI สำหรับโมเดล open-weight — DeepSeek V4 Pro, DeepSeek V4.1 Flash, DeepSeek R1, Qwen3.5 397B A17B, Qwen3 235B A22B Instruct, gpt-oss-120b, gpt-oss-20b, GLM-4.7, Llama 3.3 70B Instruct, Gemma 4 31B, Mistral Large 3, Mistral Small 4 — จ่ายต่อ token จากยอดคงเหลือคริปโตแบบเติมเงิน ในราคาต่ำกว่าค่ามัธยฐานของโฮสต์สาธารณะ 5% ไม่ต้อง KYC: ไม่ต้องใช้บัตรประชาชน ไม่ต้องเซลฟี่ ไม่ต้องใช้เอกสาร ไม่มีการเก็บ prompt และ output
