How to Use Hy4 in Google Antigravity
Hy4 is suited to complex coding and research tasks that require sustained planning. Compared with Hy4 Preview, it improves long-task execution and supports up to 65,536 output tokens.
Prompts to try with Hy4 in Google Antigravity
Copy an example into Google Antigravity, or ask in your own words.
Use Hy4 to investigate the failing tests in this project. Trace the cause, implement the smallest justified fix, and run the affected tests.
Use Hy4 to implement the settings form described in the project requirements. Include validation, saving, and error handling, then check each requirement.
Ask Hy4 through Spiral to review the diff on this branch and list the three riskiest changes. Save the result in ./assets.
Get a second opinion from Hy4 on this function, then tell me what the call cost.
Summarize these release notes with Hy4 in five bullet points.
How to set up Hy4 in Google Antigravity
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Open the MCP config
* Antigravity App: click Customizations, then Installed. In the MCP Servers section, click Copy Config File Path and open that file. * Antigravity IDE: click … at the top of the agent side panel, select MCP Servers, then Manage MCP Servers › View raw config. * Antigravity CLI: edit ~/.gemini/config/mcp_config.json.
- Add the server
Add Spiral under mcpServers:
{ "mcpServers": { "spiral": { "serverUrl": "https://api.spiral.ai/mcp" } } } - Sign in
In the Antigravity App, open Customizations › Installed. Under MCP Servers, click Authenticate next to Spiral. Sign in to Spiral, pick the organization and click Authorize. Copy the authorization code the browser shows, paste it into Enter authorization code and click Submit. No API key.
Use the Spiral skill
- Send Google Antigravity this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Hy4
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "openrouter", "model": "tencent/hy4", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Google Antigravity finds Hy4 on Spiral, shows the price and runs it.
Hy4 providers and prices
Spiral runs Hy4 through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.006679 per run at the default inputs. $0.5421 per 1M input tokens, $1.62565 per 1M output tokens.
Settings you can ask for
Ask Google Antigravity for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Max tokens | 1 to 65536 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Reasoning effort | none, low, or high | high | How much the model reasons. |
Every API field of Tencent: Hy4 is on its tool page: open its card above.
What can you do with Hy4 in Google Antigravity?
Tencent Hy4 can help carry code changes from investigation through implementation and testing. Give it the relevant project context and concrete acceptance checks.
Fix a bug across several files
Trace a failing behavior through the relevant code, propose a focused patch, and check it against the reported failure.
Plan a code migration
Compare existing code with the target requirements, identify dependencies, and break the migration into changes with acceptance checks.
Turn working notes into a report
Combine supplied notes into a report with decisions, unresolved questions, and evidence attached to each conclusion.
Review a financial model
Examine supplied assumptions and tables, explain the calculations, and flag inconsistencies for review.
Prototype a small game
Build a playable loop from a written brief, then refine controls, rules, and failure states through testing.
Develop a research computation
Translate a mathematical or scientific question into a computational approach with explicit assumptions and validation checks.
More on Hy4 and Google Antigravity
Hy4 in other agents
More Google Antigravity guides
Questions about Hy4 in Google Antigravity
Can Google Antigravity use Hy4?
Yes. Add Spiral to Google Antigravity as an MCP server, and Google Antigravity can find and run Hy4 like any built-in tool.
How much does Hy4 cost in Google Antigravity?
Up to $0.006679 per run at the default inputs. $0.5421 per 1M input tokens, $1.62565 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Google Antigravity plan is separate.
Do I need an OpenRouter account to use Hy4 in Google Antigravity?
No. Spiral runs Hy4 on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up Hy4 in Google Antigravity?
About two minutes: open the MCP config, then add the server, then sign in.
Does Google Antigravity wait while Hy4 runs?
Hy4 runs in the background. Google Antigravity starts the run, checks on it and gives you the text, json when it's ready.
What is Tencent Hy4 useful for?
Coding, office analysis, and scientific research are documented uses. Give it work that requires connecting evidence and completing several related steps.
How much context can Tencent Hy4 handle?
Hy4 and Hy4 Preview each have a 1,048,576-token context window. For a large request, identify the relevant sections and state the exact question you need answered.
How long can a Tencent Hy4 response be?
Hy4 supports up to 65,536 completion tokens; Hy4 Preview supports up to 64,000. Specify the deliverable's length instead of requesting the maximum by default.
Can Tencent Hy4 make factual mistakes?
Yes. Tencent reported lower hallucination rates for Hy4 than Hy4 Preview in an internal evaluation, but errors remained. Ask for supporting passages and verify consequential claims against the original evidence.
Can Tencent Hy4 help build a game?
Game prototyping is a documented use. Start with a small playable loop, define the controls and win condition, and refine it after testing.
Start using Hy4 in Google Antigravity
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Google Antigravity:
set up https://spiral.ai/SKILL.md


