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

# Codex ตั้งค่า

## คู่มือใช้งาน Codex กับ TinyToken

**CC-Switch ใช้งาน** · 2026/6/8 · อ่านไม่เกิน 5 นาที

คู่มือใช้งาน Codex กับ TinyToken ผ่าน CC-Switch

## 1. เปิด CC-Switch แล้วเลือก Codex

ใน CC-Switch ให้กดไอคอน Codex จากนั้นกดปุ่ม + เพื่อเพิ่ม Provider ใหม่

![รูปประกอบคู่มือ](https://524826316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzefZXBaGhZNtvOIDrgZR%2Fuploads%2Fgit-blob-5f5b2ed0eeb071e4199952e98f5233c8cea9ae08%2Fcodex-01.png?alt=media)

เลือก Codex แล้วกด +

## 2. เพิ่ม Provider ของ TinyToken

Provider Name: My codex หรือ TinyToken

Website URL: <https://tinyapi.org>

วาง API Key ในช่อง API Key

API Request URL / Endpoint: <https://api.tinyapi.org> แล้วกด Save

![รูปประกอบคู่มือ](https://524826316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzefZXBaGhZNtvOIDrgZR%2Fuploads%2Fgit-blob-86dd7767834191f4dbb32512430623dcd875cf19%2Fcodex-02.png?alt=media)

ใส่ Website URL และ API Key

## 3. คัดลอก API Key จาก TinyToken

เปิด <https://tinyapi.org/keys> แล้วกดปุ่มคัดลอก API Key จากแถวที่ต้องการ

![รูปประกอบคู่มือ](https://524826316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzefZXBaGhZNtvOIDrgZR%2Fuploads%2Fgit-blob-6c129328330c4d36b80f6e8afc745413a98b4f70%2Fcodex-03.png?alt=media)

คัดลอก API Key จาก TinyToken

## 4. เปิด Routing

ไปที่ Settings > Routing แล้วเปิด Show Routing Toggle on Main Page, Routing Master Switch และเปิด Codex

![รูปประกอบคู่มือ](https://524826316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzefZXBaGhZNtvOIDrgZR%2Fuploads%2Fgit-blob-c7b22e4df1dddf5e99230307efad7caf690d33c2%2Fcodex-04.png?alt=media)

เปิด Routing สำหรับ Codex

## 5. เปิดใช้ Provider TinyToken

กลับไปหน้า Codex ใน CC-Switch แล้วกด Enable ที่ Provider ของ TinyToken

![รูปประกอบคู่มือ](https://524826316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzefZXBaGhZNtvOIDrgZR%2Fuploads%2Fgit-blob-8123a6a80fe83fcb0875232184a9b1bc9e570948%2Fcodex-05.png?alt=media)

กด Enable ให้ Provider TinyToken

## 6. Restart Codex แล้วเลือกโมเดล

ปิด Codex ให้สนิทแล้วเปิดใหม่ ตอนนี้ควรขึ้นว่า Logged in with API key และสามารถเลือกโมเดลที่ต้องการใช้งานได้

![รูปประกอบคู่มือ](https://524826316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzefZXBaGhZNtvOIDrgZR%2Fuploads%2Fgit-blob-26ed4ec519ab71edf8c000c6561e7728532fc025%2Fcodex-06.png?alt=media)

Codex ใช้งานด้วย API Key และเลือกโมเดลได้

## สรุปค่าที่ต้องใช้

* Website URL: <https://tinyapi.org>
* API Key: คัดลอกจากหน้า TinyToken API Keys
* Routing: เปิด Routing Master Switch และ Codex
* หลังตั้งค่าเสร็จ ให้ restart Codex ก่อนใช้งาน

## Prompt สำหรับ Codex

{"สร้างหน้าเอกสาร API Docs ภาษาไทยชื่อ "วิธีใช้งาน Codex กับ TinyToken ผ่าน CC-Switch" โดยใช้ขั้นตอนจากไฟล์นี้ จัดเนื้อหาเป็น 1) เปิด CC-Switch เลือก Codex และเพิ่ม Provider 2) ใส่ endpoint <https://api.tinyapi.org> และ API Key 3) เปิด Routing: Show Routing Toggle, Routing Master Switch และ Codex 4) Enable Provider TinyToken 5) Restart Codex แล้วเลือกโมเดล ใช้ภาษาไทยสั้น เข้าใจง่าย และใส่รูปประกอบตามลำดับ"}


---

# 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.tinyapi.org/codex.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.
