|

How Many Tokens Does It Take to Build an AI Fortune-Telling Site: Tarot, BaZi, and Dream Interpretation Share a Single API

How Many Tokens Does It Take to Build an AI Fortune-Telling Site: Tarot, BaZi, and Dream Interpretation Share a Single API

Many people already have a Large Language Model key in hand and want to throw together a little tarot, bazi, or dream-interpretation site as a side hustle or a toy. What actually trips them up usually isn’t the frontend—it’s three bits of accounting: whether they need to build their own backend, how many tokens one reading burns, and which model to pick. This article uses the open source project chatgpt-tarot-divination as a base and walks through a self-hosted setup with no backend to write and seven divination types sharing a single OpenAI-compatible interface.

This is not an article about whether fortune-telling is accurate. Whether the metaphysical content is right or wrong is outside the scope of this article; here we’re only doing the engineering math: how to choose a deployment method, how to fill in environment variables, why reasoning models have to go through responses, and roughly how much 1000 readings cost.

Let’s start with the conclusion. The least painful deployment is one-click Vercel deployment—fill in the key and the API endpoint and you’re live. Estimating one reading at 3,000 input + 1,500 output tokens, gpt-6-luna costs about $0.0011, so 1000 readings come to roughly $1.1; switch to gpt-6.2-sol and 1000 readings run about $21. Prices in this article are taken from the APIYI (apiyi.com) model pricing page, with data dated 2026-11-27.

ai-fortune-telling-site-token-cost-en-image-0

AI Divination Site Core Highlights: Project Capabilities and Three Deployment Methods

chatgpt-tarot-divination is an AI divination project written in TypeScript. According to its repo page, it has 994 stars, and the most recent commit was on 2026-10-28. The project ships with 7 types of divination: Tarot, Bazi (Four Pillars of Destiny), Five-Grid Name Analysis, Duke of Zhou’s Dream Interpretation, Naming, Plum Blossom Numerology, and Romance Fortune Telling. The interface supports streaming output (typewriter effect), responsive layout, and dark mode, and each divination type automatically saves the last 10 history entries.

For anyone building a side-hustle site, the value of this project is that the frontend, prompts, and API calls are all already written. There are only two things left for you to do: pick a deployment method, and plug in the Large Language Model API. The repo offers four deployment methods; source-code deployment is for people who want to modify the code, and the other three compare as follows:

Deployment Method What You Need Difficulty Who It’s For Main Limitation
Vercel One-Click Deploy GitHub and Vercel accounts, API Key Lowest — click a button and fill in the variables Side-hustle sites that want a public URL Config changes only take effect after a redeploy
Desktop Client macOS / Windows / Linux installer Low — fill in two fields in settings Yourself or a few people around you Runs only locally, no public access
Docker A server, docker-compose Medium People who already have a server and want control Server, domain, and certificate are all yours to maintain

How to Choose a Deployment Method for an AI Divination Site

If your goal is “send a link for others to use,” go straight for Vercel. It’s free, needs no server, and after deployment you get a domain assigned (you can also bind your own domain). The desktop client is more of a personal tool — good for trying a few readings locally first, confirming you’re happy with the model’s output style, and then deciding whether to go live.

Docker suits people who already have a server, for example wanting to run it on the same machine as other services, or use it on an internal network. All three methods call the same OpenAI-compatible interface behind the scenes, so the model and parameters you tune in the client can be moved over to Vercel or Docker as-is.

🚀 Quick Start: Get your Key ready before deploying. You can register at APIYI apiyi.com, use the new-user free trial quota to run a few readings each for Tarot, Bazi, and Dream Interpretation, see exactly how many tokens each reading consumes, and then decide which model to use when you go live.

ai-fortune-telling-site-token-cost-en-image-1


AI Fortune-Telling Site Environment Variables: What the Five Key Settings Mean

Whichever deployment method you use, the set of settings you actually need to understand is the one below. The first five determine whether it runs at all and how much it costs; the last two only take effect under specific endpoints.

Variable Required? Meaning Example value
api_key Required Your API key The key generated in the platform console
api_base Optional Endpoint URL; defaults to OpenAI’s official address if left blank https://api.apiyi.com/v1
model Recommended Model name, shared across all seven divination modes gpt-6-luna
api_style Recommended chat or responses; reasoning models need responses responses
api_max_output_tokens Recommended Output cap; includes reasoning tokens when using responses 4000
api_temperature Optional Randomness; only takes effect on the chat endpoint 0.8
api_reasoning_effort Optional Reasoning effort; only takes effect on the responses endpoint; leave blank to use the model default Leave blank

The easiest place to trip up is how api_style interacts with the last two parameters. When it’s set to chat, api_reasoning_effort does nothing; when it’s set to responses, api_temperature does nothing. A lot of people tweak the temperature, see no change in the output, and never realize it’s because the API style is wrong.

Why Reasoning Models Need the responses Endpoint

The repo’s docs spell it out clearly: for reasoning models (the example given is gpt-6-luna), you need to set api_style to responses. A reasoning model produces a stretch of internal reasoning before it gives its answer, and that capability — along with the reasoning effort parameter — is exposed through the responses endpoint. If you call it through the chat endpoint, you may get an error, or you may simply not get the reasoning behavior you expected.

On billing: with the responses endpoint, api_max_output_tokens includes reasoning tokens. In other words, the reading you see might be only about 1,500 characters, while the output tokens on your bill are higher. Under APIYI’s unified endpoint, reasoning models go through https://api.apiyi.com/v1/responses, while ordinary chat models use the chat endpoint under the same base. Both protocols share one key, so switching means changing only api_style — no need to change the URL.

Quick Start for the AI Fortune-Telling Site: Three Steps to One-Click Deploy on Vercel

Using Vercel as an example, each step comes with acceptance criteria. Complete one step, confirm it passes, then move to the next.

Step 1: Start the deployment from the repo

  • Open dreamhunter2333/chatgpt-tarot-divination on GitHub and click the Deploy button in the README.
  • Log in to Vercel as prompted, and authorize it to create a copy of the repo under your GitHub account.
  • Acceptance criteria: A new project appears on the Vercel page, and you reach the environment variable setup screen.

Step 2: Fill in the environment variables

  • api_key: Enter your API key.
  • api_base: Enter an OpenAI-compatible URL, for example https://api.apiyi.com/v1.
  • model: Start with gpt-6-luna. It’s cheap, and it lets you verify the responses pipeline.
  • api_style: Enter responses, because gpt-6-luna is a reasoning model.
  • api_max_output_tokens: Start with 4000 to leave headroom for reasoning tokens.
  • Acceptance criteria: All five variable names are spelled exactly as in the repo instructions, with correct casing. api_base has no extra trailing slash or duplicated path.

Step 3: Deploy and try a reading

  • Click Deploy, wait for the build to finish, then open the domain Vercel assigns.
  • Go to the tarot page, ask any question, and submit it.
  • Acceptance criteria: The result appears character by character with a typewriter effect, and after you refresh, this reading shows up in the history. If you want to use your own domain, bind it in the Vercel project settings and visit the site again.

Docker and Desktop Client Deployment Notes

If you’re using Docker or the desktop client, the configuration fields mean exactly the same thing—only the place you enter them changes:

  • Docker image: ghcr.io/dreamhunter2333/chatgpt-tarot-divination:latest. Put the environment variables above into the environment section of docker-compose, then start it with docker-compose up -d.
  • Docker acceptance criteria: The container is running, visiting the mapped port in a browser opens the homepage, and you can complete a reading.
  • Desktop client: After installation, open settings and fill in the two fields: API BASE URL and API KEY.
  • Client acceptance criteria: After saving the settings, the dream interpretation page can stream results.

How to Pair Models and Prompts for Tarot, Bazi, and Dream Interpretation

Let’s get one limitation out of the way first: model is a global variable, and all seven types of divination in a single deployment share the same model. If you want “a cheap model for tarot and an expensive model for Bazi,” the simplest approach is to deploy multiple instances. For example, set up two Vercel projects, fill in the same api_base and API key, change only model and api_style, and tell them apart with different subdomains. That’s what “sharing one API setup” really means: there’s only one endpoint and one key, and you switch models per instance.

Divination Type Input characteristics Recommended model api_style Parameter tips Available platform
Tarot Question plus card spread, short input, focused on narrative gpt-6-luna or qwen3.8-flash use responses for luna, chat for qwen under chat, set temperature around 0.8 APIYI
Bazi (Birth Chart) Birth information plus multidimensional interpretation, longer output gpt-6-luna, or gpt-6.2-sol if budget allows luna uses responses set the output limit high enough, leave reasoning effort blank for now APIYI
Zhougong Dream Interpretation Dream descriptions vary in length, leans toward literary associations qwen3.8-flash, deepseek-v4.1-flash, or gemini-3.8-flash follow the platform docs temperature can be a bit higher, moderate output limit APIYI

The idea behind this table is that the structure of the task determines the model tier. Tarot and dream interpretation are essentially about writing an interpretation around the given material, so the lower-cost flash tier is enough. Bazi requires first organizing the birth information and then expanding across dimensions; the structure is more complex, so it’s better suited to a reasoning model—or a higher-tier model when budget allows. The recommendations in the table are editorial suggestions, not the repository’s default configuration.

How to Configure Prompts for the Three Types of Divination

The project already has built-in prompts for each type of divination, so the one-click Vercel deployment doesn’t need any changes. If you deploy from source and want to adjust them, you can find the prompt for each divination in the project code; check the repository source for exact locations. Here are some ideas to use as a guide when making changes:

  • Tarot: Fix the output structure in the system prompt, for example “card meaning → connection to the question → advice,” and cap the total word count so the model doesn’t ramble on and let output tokens spiral out of control.
  • Bazi: Put the birth information exactly as the user entered it at the top of the prompt, and ask the model to restate it before interpreting. That keeps the structure stable and makes the reasoning process shorter.
  • Dream interpretation: Users’ dream descriptions can be long, so you can limit input length on the frontend and control input tokens at the source.

💡 Selection tip: Model IDs must match exactly how they’re written on the platform. Before entering one, copy it from the model list on APIYI at apiyi.com, and check whether it supports chat or responses while you’re there. If you’re not sure, use your free credits to run all three types of divination in the desktop client and do a quick comparison.


How Many Tokens for 1,000 Readings: AI Fortune-Telling Site Cost Table

The cost estimate assumes about 3,000 input tokens and 1,500 output tokens per reading. Input includes the system prompt and user content; output is the reading text itself. The calculation is: cost per reading = 3,000 × input price / 1M + 1,500 × output price / 1M. All figures below are estimates, prices are in USD per 1M tokens, and the data date is 2026-11-27.

Model Input Output Cache read Estimated per reading Estimated for 1,000 readings
gpt-6-luna $0.1 $0.5 $0.01 About $0.0011 About $1.1
qwen3.8-flash $0.114 $0.3876 $0.01425 About $0.0009 About $0.92
deepseek-v4.1-flash $0.3 $1.2 $0.006 About $0.0027 About $2.7
gemini-3.8-flash $0.75 $3.75 $0.075 About $0.0079 About $7.9
gpt-6.2-sol $2 $10 $0.1 About $0.021 About $21

Prices come from APIYI’s model pricing page at docs.apiyi.com/models. Before launch, check that page for the current prices. As you can see, the first two tiers cost only a dollar or two to run 1,000 readings, while gpt-6.2-sol is about 20 times more expensive. For a side-project site, the model tier matters more than traffic volume when it comes to cost.

ai-fortune-telling-site-token-cost-en-image-2

How Reasoning Tokens and Cache Reads Affect the Bill

The table above doesn’t count reasoning tokens. Take gpt-6-luna: if each reading produces an extra 1,500 reasoning tokens, total output is 3,000, or about $0.0018 per reading and about $1.8 for 1,000. So api_max_output_tokens isn’t just there to prevent truncation—it’s also a cost guardrail: the higher the cap, the higher your worst-case bill.

Cache reads bring the bill down. Suppose 2,000 of the 3,000 input tokens per reading are a repeated system prompt that hits the cache. With gpt-6.2-sol, the input portion drops from $0.006 to about $0.0022, making it about $0.017 per reading. But whether you hit the cache depends on how stable the prompt prefix is, so you can’t treat it as a fixed discount. Also, streaming output doesn’t change the per-token price, and history stored only locally or in the browser isn’t billed extra.


AI Fortune-Telling Site Troubleshooting Table: Common Errors and Fixes

Symptom Possible Cause How to Handle
Returns 401 api_key is entered wrong, has extra spaces, or the key has expired Copy the key again, check for leading/trailing spaces, then redeploy
Returns 404 api_base is missing or has a duplicated /v1, or the model name doesn’t exist Check the address and model ID against the platform docs
Error says the model doesn’t support this endpoint A reasoning model is using chat Change api_style to responses
The reading stops halfway api_max_output_tokens is too small, and reasoning tokens have used up the quota Raise the limit, or lower the reasoning effort
Changing api_temperature has no effect It’s currently going through responses Temperature only works with chat; use reasoning effort to adjust instead
Config changed but nothing changes online Vercel environment variables were modified without redeploying Trigger a Redeploy in Vercel
History is gone Switched browsers or cleared the cache History is stored locally, so this is expected behavior

FAQ

Q1: I don’t know backend development at all—can I still get the AI fortune-telling site running?

Yes. Vercel one-click deployment just needs you to click a button and fill in environment variables—no backend code required. The project already handles model invocation and streaming output; you only need to provide the key and the endpoint address.

Q2: Roughly how much does one reading cost?

Estimating 3,000 input + 1,500 output tokens, gpt-6-luna is about $0.0011, qwen3.8-flash is about $0.0009, and gpt-6.2-sol is about $0.021. Reasoning models also add reasoning tokens on top. I suggest running a few readings on APIYI’s free quota first, then recalculating based on the real usage in the console.

Q3: Can reasoning models use the chat endpoint directly?

Not recommended. The repo explicitly requires reasoning models to use responses; otherwise parameters like reasoning effort won’t apply, and it may throw an error outright. Regular flash-tier models are fine with chat.

Q4: Can the seven divination types each use a different model?

Not with a single deployment, because `model` is a global variable. A workable approach is to deploy multiple instances that share the same endpoint address and key, fill in a different model for each instance, and assign subdomains by divination type.

Q5: How do I point api_base to APIYI?

In the `api_base` environment variable, fill in the OpenAI-compatible address provided by APIYI apiyi.com (see the environment variable table above), and replace `api_key` with a key generated on that platform. One key lets you switch between GPT, Gemini, Qwen, DeepSeek, and other models, so you don’t need to sign up again when comparing tiers.

Q6: What are the limitations of this approach?

Models are configured globally, so fine-grained model selection requires deploying multiple instances. History is stored only locally and can’t sync across devices. The project itself has no payments, rate limiting, or user system, so if you launch it publicly, the cost of abuse will land directly on your key.


AI Fortune-Telling Site Token Costs: Key Takeaways

  • The easiest deployment: one-click deploy on Vercel — free, no server needed, just fill in the variables and you’re live.
  • Five key variables: api_key, api_base, model, api_style, and api_max_output_tokens determine whether it runs and how much it costs.
  • Match the protocol: reasoning models go through responses, temperature only applies to chat, and reasoning effort only applies to responses.
  • Tier by task: tarot and dream interpretation are fine on the flash tier; BaZi can use a reasoning model or a higher-tier model.
  • Cost scale: 1,000 readings cost about $1.1 with gpt-6-luna and about $21 with gpt-6.2-sol — both are estimates.
  • One endpoint for everything: on APIYI, you can switch between multiple models with the same key and base URL, which makes cost comparisons easy.

Summary

Building an AI fortune-telling site isn’t really about the frontend — it comes down to three things:

  1. Deployment: pick Vercel if you need a public URL, the desktop client for personal use, or Docker if you already have a server.
  2. Protocol: pair reasoning models with responses and regular models with chat; the parameters have to match the API style.
  3. Cost: the model tier drives the bill, the output cap is your cost guardrail, and cache reads are a bonus rather than a guaranteed discount.

One heads-up: the following cases aren’t a good fit for this setup as-is. Commercial sites that need user login, payments, and rate limiting won’t get those features from the project itself. Neither will scenarios that need history saved across devices. And neither will a public site tied to an expensive model with no anti-abuse measures in place. In all of these cases, you should add backend capabilities first, then think about going live.

If you just want to validate a divination site idea on the cheap, start by getting the tarot, BaZi, and dream interpretation pages working with APIYI apiyi.com’s free credits. Then recalculate the cost of 1,000 readings using real token usage, and decide whether to switch models or split instances.

📚 References

  1. chatgpt-tarot-divination repository: Project source code, deployment button, and configuration instructions

    • Link: github.com/dreamhunter2333/chatgpt-tarot-divination
    • Details: Original documentation for the seven divination features, four deployment methods, and all environment variables
  2. Project Docker image: Official image used for container deployment

    • Link: ghcr.io/dreamhunter2333/chatgpt-tarot-divination
    • Details: Used with docker-compose; environment variables have the same meaning as on Vercel
  3. APIYI model pricing page: Source of the prices in this article’s cost table

    • Link: docs.apiyi.com/models
    • Details: Input, output, and cache-read unit prices; data dated 2026-11-27

Author: APIYI Technical Team
Technical discussion: Feel free to contact us from the APIYI homepage to share experiences with AI application deployment and token cost optimization.

Similar Posts