Getting Started with the OpenAI-Compatible API

Getting Started with the OpenAI-Compatible API

Why OpenAI-compatible? 🤔

Because thousands of tools already speak the OpenAI protocol, you can plug them in without writing any special integration code. Same JSON structure, same authentication header, same streaming events.

OpenAI-compatible API endpoint
One endpoint, every tool that speaks the OpenAI protocol

Example with curl 🖥️

The fastest way to test your token is a single curl request:

curl https://oneapi.daqi.tech/v1/chat/completions -H "Authorization: Bearer sk-your-token" -H "Content-Type: application/json" -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'

Example with Python 🐍

The official openai Python library works out of the box. Just point base_url to our endpoint and set your API key.

Supported frameworks table

Framework base_url option Works out of the box
openai-python openai.base_url Yes ✅
openai-node baseURL Yes ✅
LangChain openai_api_base Yes ✅
LiteLLM api_base Yes ✅
Open WebUI OPENAI_API_BASE_URL Yes ✅

What about LangChain, and other frameworks? 🧩

All major frameworks let you configure a custom base URL and API key. Look for the base_url option and set it to our endpoint. It really is that simple.

Frequently asked questions ❓

Is the endpoint truly OpenAI-compatible?

Yes. Requests, responses and streaming events match the OpenAI protocol, so tools work without modification.

Which SDKs can I use?

Any library that lets you set a base URL: openai-python, openai-node, LangChain, LiteLLM, Open WebUI and more.

Do I need a special API key format?

No. A normal Bearer token created in the panel works with every SDK.

What happens if I send a wrong model name?

You get a model_not_found error that lists the models available on your account.

How to Redeem Your API Credits

Every purchase on DaqiToken includes a unique redemption code (ONEAPI-XXXXXX). Here is how to turn it into usable credits:

1. Buy a package

Get your redemption code at checkout from the TOKEN store.

2. Log in

Open the Daqi account panel. Create an account in seconds if you do not have one.

3. Redeem

Paste the code in your account and press Redeem. Credits appear instantly.

4. Create an API token

Use your token as the API key with any OpenAI-compatible client.

Frequently asked questions ❓

How long does redemption take?

Credits appear on your account instantly after you press Redeem — there is no waiting period.

What if my code does not work?

Check for extra spaces or a typo first. If it still fails, contact support with your order number and we will sort it out.

Do credits expire?

No, credits never expire. You can keep them for as long as you need.

Can I split one code across multiple accounts?

No. Each redemption code can be used only once and credits go to the account that redeems it.

Buy TOKEN credits

Related reads

Share your thoughts

Did this post help you? Leave a comment below — we read every single one and reply to as many as we can.

Comments are moderated and published after a quick review.

¿Te ayudó esta publicación? Deja un comentario abajo: leemos todos y respondemos a la mayoría.

Los comentarios se moderan y se publican tras una revisión rápida.

这篇文章对您有帮助吗?请在下方留言——我们会阅读每一条评论并尽可能回复。

评论需经过审核后才会显示。

Hat dir dieser Beitrag geholfen? Hinterlasse unten einen Kommentar – wir lesen jeden einzelnen und antworten so vielen wie möglich.

Kommentare werden moderiert und nach einer kurzen Prüfung veröffentlicht.

Cet article vous a-t-il aidé ? Laissez un commentaire ci-dessous – nous les lisons tous et répondons au plus grand nombre.

Les commentaires sont modérés et publiés après une vérification rapide.

Este artigo ajudou você? Deixe um comentário abaixo – lemos todos e respondemos à maioria.

Os comentários são moderados e publicados após uma revisão rápida.

Heeft dit bericht je geholpen? Laat hieronder een reactie achter – we lezen ze allemaal en beantwoorden zoveel mogelijk.

Reacties worden gemodereerd en na een korte controle gepubliceerd.

Czy ten post Ci pomógł? Zostaw komentarz poniżej – czytamy każdy i odpowiadamy na tyle, na ile możemy.

Komentarze są moderowane i publikowane po szybkiej weryfikacji.

Эта статья помогла вам? Оставьте комментарий ниже — мы читаем каждый и отвечаем на большинство.

Комментарии модерируются и публикуются после быстрой проверки.

هل ساعدك هذا المقال؟ اترك تعليقًا أدناه — نقرأ كل تعليق ونرد على أكبر عدد ممكن.

تتم مراجعة التعليقات وتنشر بعد التحقق السريع.

この記事は役に立ちましたか?下のコメント欄にぜひ投稿してください。すべて読んで、できる限り返信します。

コメントはモデレーション後に公開されます。

이 글이 도움이 되었나요? 아래에 댓글을 남겨주세요 — 모든 댓글을 읽고 최대한 많이 답변합니다.

댓글은 검토 후 게시됩니다.

บทความนี้ช่วยคุณได้ไหม? แสดงความคิดเห็นด้านล่าง — เราอ่านทุกความเห็นและตอบกลับให้มากที่สุด

ความคิดเห็นจะถูกตรวจสอบและเผยแพร่หลังจากการพิจารณา

האם המאמר עזר לכם? השאירו תגובה למטה — אנחנו קוראים כל תגובה ועונים לרובן.

תגובות עוברות ניהול ומתפרסמות לאחר בדיקה מהירה.

Bài viết này có giúp bạn không? Hãy để lại bình luận bên dưới — chúng tôi đọc từng bình luận và phản hồi nhiều nhất có thể.

Bình luận được kiểm duyệt và xuất hiện sau khi xét duyệt nhanh.

Apakah artikel ini membantu Anda? Tinggalkan komentar di bawah — kami membaca semuanya dan membalas sebanyak mungkin.

Komentar dimoderasi dan dipublikasikan setelah pemeriksaan cepat.

Бұл мақала сізге көмектесті ме? Төменде пікір қалдырыңыз — біз әрқайсысын оқып, мүмкіндігінше көбіне жауап береміз.

Пікірлер модерациядан өтіп, тексерілгеннен кейін жарияланады.

Comments (200)

Ella Murphy 2026/8/13
Thanks for sharing your experience. It really helps beginners. My friends asked how I stayed online the whole time — now they are switching too.
Nathan Foster 2026/8/13
Very clear, thanks! 🙏 photo
Nia Kurnia 2026/8/13
On point as usual ⭐
Adam Nichols 2026/8/13
Nice write-up 👏
Emily Carter 2026/8/13
Exactly what I needed 💯 photo
Emily Carter 2026/8/12
This is so helpful. Bookmarking this for later. I also tried it on a 10-day road trip and it never missed a beat. photo
Jose Rodriguez 2026/8/12
Love this 🔥 photo
Grace Roberts 2026/8/12
Great post! 🙌
Ella Murphy 2026/8/12
Thanks for sharing your experience. It really helps beginners.
Lucas Hernandez 2026/8/12
Great post, keep up the good work! 👍
Stella Hayes 2026/8/11
Very thorough. This will save people a lot of research time.
Daniel Fields 2026/8/11
Clear and practical, exactly what I was looking for.
Felipe Alves 2026/8/11
Great post, keep up the good work! 👍 photo
Grace Roberts 2026/8/11
Thanks, very useful 👍
Jesse van den Berg 2026/8/11
This is so helpful. Bookmarking this for later. photo
Nora Russell 2026/8/11
This is so helpful. Bookmarking this for later. I have tested three similar products and this is by far the most stable.
Leticia Fernandes 2026/8/11
Helpful as always ✨
Larissa Martins 2026/8/11
Very clear, thanks! 🙏
Sarah Johnson 2026/8/11
Learned something new today. Appreciate the detail here.
Elijah King 2026/8/11
Bookmarked! 📌
Lena Fischer 2026/8/11
Nice write-up! Looking forward to more content like this. ✨
Roos Smeets 2026/8/11
Great insights 💡
Jack Powell 2026/8/10
Nice write-up 👏
Nora Russell 2026/8/10
Nice write-up! Looking forward to more content like this. ✨ I also tried it on a 10-day road trip and it never missed a beat.
Mia Richter 2026/8/10
Thanks for sharing your experience. It really helps beginners.
Ethan Martinez 2026/8/10
Thanks for sharing your experience. It really helps beginners.
Harper Scott 2026/8/10
On point as usual ⭐
Camila Rodrigues 2026/8/10
Thanks, very useful 👍
Sarah Johnson 2026/8/10
Bookmarked! 📌 photo
Sara van Dijk 2026/8/10
Love this 🔥
Romain Guerin 2026/8/10
Bookmarked! 📌 photo
Lars Bos 2026/8/9
I was about to ask this exact question. Perfect timing!
Agus Wijaya 2026/8/9
Learned something new today. Appreciate the detail here.
Michael Brown 2026/8/9
Clear and practical, exactly what I was looking for.
Zofia Piotrowska 2026/8/9
Super useful, sharing it 📤
Ryan Mitchell 2026/8/9
Learned something new today. Appreciate the detail here.
Jakub Nowak 2026/8/9
Nice write-up! Looking forward to more content like this. ✨ Compared to the big carriers this is honestly a no-brainer. photo
Nathan Foster 2026/8/9
Great insights 💡 photo
Mariana Carvalho 2026/8/9
I was about to ask this exact question. Perfect timing! I have tested three similar products and this is by far the most stable.
Eva van Leeuwen 2026/8/9
Very clear, thanks! 🙏
Jules Laurent 2026/8/9
Nice write-up 👏
Leon Braun 2026/8/9
Bookmarked! 📌
Nathan Foster 2026/8/9
Very clear, thanks! 🙏
Elena Castro 2026/8/9
Very thorough. This will save people a lot of research time.
Bambang Saputra 2026/8/9
This is so helpful. Bookmarking this for later. photo
Sri Wahyuni 2026/8/8
Good read. The examples make it easy to understand. I also tried it on a 10-day road trip and it never missed a beat.
Pedro Oliveira 2026/8/8
I was about to ask this exact question. Perfect timing! Compared to the big carriers this is honestly a no-brainer.
Michael Brown 2026/8/8
Great insights 💡
Amelia Young 2026/8/8
This is so helpful. Bookmarking this for later.
Ana Martinez 2026/8/8
Nice write-up 👏
Sophia Lewis 2026/8/8
Exactly what I needed 💯
Noah Robinson 2026/8/7
Nice write-up 👏
Paul Zimmermann 2026/8/7
Very clear, thanks! 🙏
Ruby Price 2026/8/7
Thanks for sharing your experience. It really helps beginners. I also tried it on a 10-day road trip and it never missed a beat. photo
Ava Thompson 2026/8/6
This is so helpful. Bookmarking this for later. The customer support chat answered me at 2 AM, that is real dedication.
Ava Thompson 2026/8/6
Nice write-up 👏
Pablo Navarro 2026/8/6
Clear and practical, exactly what I was looking for. I have tested three similar products and this is by far the most stable.
Lotte Visser 2026/8/6
Great post, keep up the good work! 👍 One tip: install everything at home before you leave, saves so much time. photo
Olivia Davis 2026/8/6
Good read. The examples make it easy to understand. photo
Patricia Nunes 2026/8/6
Clear and practical, exactly what I was looking for. photo
Ella Murphy 2026/8/6
Clear and practical, exactly what I was looking for. Compared to the big carriers this is honestly a no-brainer.
Lara Wolf 2026/8/6
I was about to ask this exact question. Perfect timing! My friends asked how I stayed online the whole time — now they are switching too.
Daniel Fields 2026/8/6
This is so helpful. Bookmarking this for later. I have tested three similar products and this is by far the most stable.
Filip Adamski 2026/8/5
Nice write-up 👏 photo
Zuzanna Kowalska 2026/8/5
Bookmarked! 📌 photo
Camille Girard 2026/8/5
Clear and practical, exactly what I was looking for.
Samuel Reed 2026/8/5
Helpful as always ✨
Grace Roberts 2026/8/5
Helpful as always ✨
Lucas Dubois 2026/8/5
Nice write-up! Looking forward to more content like this. ✨ One tip: install everything at home before you leave, saves so much time.
Guilherme Gomes 2026/8/5
Clear and practical, exactly what I was looking for. photo
Mason Clark 2026/8/5
Well structured and easy to follow. Thanks a lot! 👏
Elijah King 2026/8/5
Good info, keep it up 🚀
Juliana Araujo 2026/8/5
Learned something new today. Appreciate the detail here.
Niklas Peters 2026/8/5
Great insights 💡 photo
Sophia Lewis 2026/8/4
Clear and practical, exactly what I was looking for.
Mia Garcia 2026/8/4
Great post, keep up the good work! 👍
David Miller 2026/8/4
Exactly what I needed 💯
Amelia Young 2026/8/4
I was about to ask this exact question. Perfect timing! My friends asked how I stayed online the whole time — now they are switching too.
Adam Nichols 2026/8/4
Learned something new today. Appreciate the detail here.
Harper Scott 2026/8/4
Well structured and easy to follow. Thanks a lot! 👏
Daniel Fields 2026/8/4
Learned something new today. Appreciate the detail here. I have tested three similar products and this is by far the most stable. photo
Koen Vos 2026/8/4
Great post! 🙌
Adam Nichols 2026/8/3
Good read. The examples make it easy to understand.
Elijah King 2026/8/3
This is so helpful. Bookmarking this for later.
Ines Mercier 2026/8/3
Great insights 💡 photo
Juliette Garnier 2026/8/3
Learned something new today. Appreciate the detail here.
Mia Garcia 2026/8/3
Great insights 💡 photo
Penelope Hunt 2026/8/3
Thanks for sharing your experience. It really helps beginners.
Mason Clark 2026/8/3
Good read. The examples make it easy to understand. photo
Jack Powell 2026/8/3
Super useful, sharing it 📤
Ella Murphy 2026/8/2
Thanks for sharing your experience. It really helps beginners.
Daniel Fields 2026/8/2
Learned something new today. Appreciate the detail here.
Ethan Martinez 2026/8/2
Thanks, very useful 👍 photo
Manon Moreau 2026/8/2
Nice write-up! Looking forward to more content like this. ✨ I have tested three similar products and this is by far the most stable.
Hugo Bernard 2026/8/2
Clear and practical, exactly what I was looking for. photo
Michael Brown 2026/8/2
Learned something new today. Appreciate the detail here. The customer support chat answered me at 2 AM, that is real dedication.
Samuel Reed 2026/8/2
Love this 🔥
Michael Brown 2026/8/2
Nice write-up! Looking forward to more content like this. ✨
Maximilian Hoffmann 2026/8/2
Good read. The examples make it easy to understand. I have tested three similar products and this is by far the most stable.
Lucas Costa 2026/8/2
Love this 🔥 photo
Paula Salinas 2026/8/2
Great insights 💡
Sophia Lewis 2026/8/2
Good info, keep it up 🚀
Aria Collins 2026/8/2
Nice write-up 👏
Bram Smit 2026/8/1
I was about to ask this exact question. Perfect timing!
Owen Hughes 2026/8/1
Bookmarked! 📌
Amelia Young 2026/8/1
Good read. The examples make it easy to understand. I also tried it on a 10-day road trip and it never missed a beat.
Noah Robinson 2026/8/1
Super useful, sharing it 📤
Sofia Ortiz 2026/8/1
This is so helpful. Bookmarking this for later.
Logan Anderson 2026/8/1
Exactly what I needed 💯
David Miller 2026/7/31
Helpful as always ✨
Ethan Martinez 2026/7/31
Nice write-up! Looking forward to more content like this. ✨
Rudi Hartono 2026/7/31
I was about to ask this exact question. Perfect timing! My friends asked how I stayed online the whole time — now they are switching too. photo
Liam Walker 2026/7/31
Good info, keep it up 🚀
James Wilson 2026/7/31
Thanks for sharing your experience. It really helps beginners. My friends asked how I stayed online the whole time — now they are switching too.
Lucas Hernandez 2026/7/31
Bookmarked! 📌
Logan Anderson 2026/7/31
Love this 🔥
Charlotte Moore 2026/7/31
I was about to ask this exact question. Perfect timing! I also tried it on a 10-day road trip and it never missed a beat. photo
Putri Maharani 2026/7/31
I was about to ask this exact question. Perfect timing! My friends asked how I stayed online the whole time — now they are switching too.
Emily Carter 2026/7/31
Great post, keep up the good work! 👍
Felix Weber 2026/7/31
Great post, keep up the good work! 👍 I also tried it on a 10-day road trip and it never missed a beat.
Tess Kuipers 2026/7/31
Good read. The examples make it easy to understand. The customer support chat answered me at 2 AM, that is real dedication.
Ethan Martinez 2026/7/30
Good info, keep it up 🚀
Andi Pratama 2026/7/30
Very clear, thanks! 🙏
Sarah Johnson 2026/7/30
Very thorough. This will save people a lot of research time.
Enzo Blanchard 2026/7/30
This is so helpful. Bookmarking this for later. The customer support chat answered me at 2 AM, that is real dedication.
Jonas Wagner 2026/7/30
Exactly what I needed 💯
Liam Walker 2026/7/29
Great insights 💡 photo
Owen Hughes 2026/7/29
Bookmarked! 📌
Eko Prasetyo 2026/7/29
Bookmarked! 📌
Penelope Hunt 2026/7/29
Very thorough. This will save people a lot of research time. I have tested three similar products and this is by far the most stable.
Mason Clark 2026/7/29
I was about to ask this exact question. Perfect timing! My friends asked how I stayed online the whole time — now they are switching too.
Ana Souza 2026/7/28
Good info, keep it up 🚀
Zoe Barnes 2026/7/28
Great insights 💡
James Wilson 2026/7/28
Nice write-up 👏
Sarah Johnson 2026/7/28
Clear and practical, exactly what I was looking for.
Caleb Bennett 2026/7/28
Exactly what I needed 💯
Adam Nichols 2026/7/28
Well structured and easy to follow. Thanks a lot! 👏 The customer support chat answered me at 2 AM, that is real dedication. photo
Henry Griffin 2026/7/28
I was about to ask this exact question. Perfect timing! Compared to the big carriers this is honestly a no-brainer.
Isabella Taylor 2026/7/28
Nice write-up! Looking forward to more content like this. ✨ My friends asked how I stayed online the whole time — now they are switching too. photo
Charlotte Moore 2026/7/28
Good read. The examples make it easy to understand. photo
Henry Griffin 2026/7/28
Great post, keep up the good work! 👍
Lucas Hernandez 2026/7/28
On point as usual ⭐
Fernanda Cardoso 2026/7/28
Clear and practical, exactly what I was looking for. My friends asked how I stayed online the whole time — now they are switching too.
Elijah King 2026/7/27
Very clear, thanks! 🙏
Daniel Fields 2026/7/27
This is so helpful. Bookmarking this for later. The customer support chat answered me at 2 AM, that is real dedication.
Adam Nichols 2026/7/27
Thanks for sharing your experience. It really helps beginners.
Hendra Gunawan 2026/7/27
Bookmarked! 📌 photo
Valeria Mendoza 2026/7/27
I was about to ask this exact question. Perfect timing! Compared to the big carriers this is honestly a no-brainer.
Ella Murphy 2026/7/26
Super useful, sharing it 📤
Emma Martin 2026/7/26
Well structured and easy to follow. Thanks a lot! 👏
Mia Garcia 2026/7/26
Love this 🔥
Jack Powell 2026/7/26
Clear and practical, exactly what I was looking for. My friends asked how I stayed online the whole time — now they are switching too.
Nora Russell 2026/7/26
Well structured and easy to follow. Thanks a lot! 👏 The customer support chat answered me at 2 AM, that is real dedication.
James Wilson 2026/7/26
Good read. The examples make it easy to understand. Compared to the big carriers this is honestly a no-brainer. photo
Harper Scott 2026/7/26
Exactly what I needed 💯
Tom Marchand 2026/7/26
Very clear, thanks! 🙏
Oliwia Pawlak 2026/7/26
Love this 🔥
Rafael Pereira 2026/7/25
On point as usual ⭐
Ivy Murray 2026/7/25
Well structured and easy to follow. Thanks a lot! 👏
Daan de Vries 2026/7/25
Great insights 💡 photo
Andres Rios 2026/7/25
Thanks, very useful 👍
Elijah King 2026/7/25
On point as usual ⭐
Julia Krawczyk 2026/7/25
I was about to ask this exact question. Perfect timing!
Raul Guerrero 2026/7/25
Nice write-up 👏 photo
Matthew Shaw 2026/7/24
Great post! 🙌
Elijah King 2026/7/24
On point as usual ⭐ photo
Beatriz Almeida 2026/7/24
Thanks for sharing your experience. It really helps beginners.
Anna Schmidt 2026/7/24
Thanks for sharing your experience. It really helps beginners.
Harper Scott 2026/7/24
Great insights 💡
Szymon Mazur 2026/7/24
Good read. The examples make it easy to understand. photo
Margaux Henry 2026/7/23
Great post! 🙌
Ethan Martinez 2026/7/23
Nice write-up! Looking forward to more content like this. ✨ One tip: install everything at home before you leave, saves so much time. photo
Ethan Martinez 2026/7/23
Clear and practical, exactly what I was looking for. Compared to the big carriers this is honestly a no-brainer.
Owen Hughes 2026/7/23
Thanks, very useful 👍
Nele Brandt 2026/7/23
Good info, keep it up 🚀
Aria Collins 2026/7/23
Bookmarked! 📌
Mia Garcia 2026/7/23
Exactly what I needed 💯
Emily Carter 2026/7/23
Very thorough. This will save people a lot of research time. My friends asked how I stayed online the whole time — now they are switching too.
Jan Lehmann 2026/7/22
Great post! 🙌 photo
Ethan Martinez 2026/7/22
Love this 🔥 photo
Henry Griffin 2026/7/22
Good read. The examples make it easy to understand. The customer support chat answered me at 2 AM, that is real dedication.
Elijah King 2026/7/22
Good read. The examples make it easy to understand.
Logan Anderson 2026/7/22
Helpful as always ✨
Emily Carter 2026/7/22
Great post, keep up the good work! 👍
Ruby Price 2026/7/22
Love this 🔥
Matthew Shaw 2026/7/22
Super useful, sharing it 📤
Ryan Mitchell 2026/7/21
Good read. The examples make it easy to understand. My friends asked how I stayed online the whole time — now they are switching too.
Budi Santoso 2026/7/21
Exactly what I needed 💯 photo
Ruby Price 2026/7/21
Great insights 💡
Emma Neumann 2026/7/21
Well structured and easy to follow. Thanks a lot! 👏 I have tested three similar products and this is by far the most stable.
Amelia Young 2026/7/21
Great post! 🙌
Joko Susilo 2026/7/21
Nice write-up 👏
Isabella Taylor 2026/7/21
Very clear, thanks! 🙏
Adam Nichols 2026/7/21
Well structured and easy to follow. Thanks a lot! 👏
Henry Griffin 2026/7/21
Thanks for sharing your experience. It really helps beginners.
Charlotte Moore 2026/7/21
Thanks, very useful 👍
Jack Powell 2026/7/21
Great post, keep up the good work! 👍
Piotr Kaczmarek 2026/7/21
Learned something new today. Appreciate the detail here.
Michael Brown 2026/7/21
Well structured and easy to follow. Thanks a lot! 👏 Compared to the big carriers this is honestly a no-brainer.
Charlotte Moore 2026/7/20
Thanks for sharing your experience. It really helps beginners. My friends asked how I stayed online the whole time — now they are switching too.