)
}
diff --git a/apps/docs/src/app/pricing/SwitchToHobbyButton.tsx b/apps/docs/src/app/pricing/SwitchToHobbyButton.tsx
new file mode 100644
index 000000000..f4864267e
--- /dev/null
+++ b/apps/docs/src/app/pricing/SwitchToHobbyButton.tsx
@@ -0,0 +1,45 @@
+'use client'
+
+import { useEffect, useState } from 'react'
+import { Button } from '@/components/Button'
+import { useUser } from '@/utils/useUser'
+
+import { TierActiveTag } from './TierActiveTag'
+
+
+const tierID = 'base_v1'
+
+function SwitchToHobbyButton() {
+ const { user } = useUser()
+ const [url, setURL] = useState('')
+
+ useEffect(function getBillingURL() {
+ if (!user) return
+ const u = `${process.env.NEXT_PUBLIC_STRIPE_BILLING_URL}?prefilled_email=${user.teams[0].email}`
+ setURL(u)
+ }, [user])
+
+ // Only show the button if the user is on the base_v1 tier.
+ // Teams can have custom tiers. We only want the button to users on the free tier.
+ if (!user) {
+ return
+ }
+
+ return (
+
+
{error && (
{error}
)}
@@ -75,4 +72,4 @@ function SwitchTearButton({
)
}
-export default SwitchTearButton
+export default SwitchTierButton
diff --git a/apps/docs/src/app/pricing/TierActiveTag.tsx b/apps/docs/src/app/pricing/TierActiveTag.tsx
new file mode 100644
index 000000000..5203ce8a7
--- /dev/null
+++ b/apps/docs/src/app/pricing/TierActiveTag.tsx
@@ -0,0 +1,9 @@
+
+export function TierActiveTag() {
+ return (
+
+ ACTIVE
+
+ )
+}
+
diff --git a/apps/docs/src/app/pricing/page.mdx b/apps/docs/src/app/pricing/page.mdx
index b2545c45d..3e3aed98f 100644
--- a/apps/docs/src/app/pricing/page.mdx
+++ b/apps/docs/src/app/pricing/page.mdx
@@ -1,5 +1,6 @@
import Promo from './Promo'
-import SwitchTearButton from './SwitchTearButton'
+import SwitchToHobbyButton from './SwitchToHobbyButton'
+import SwitchToProButton from './SwitchToProButton'
import ManageBilling from './ManageBilling'
# Pricing
@@ -9,7 +10,6 @@ import ManageBilling from './ManageBilling'
We charge you based on your real sandbox usage. All new users get one-time free $100 worth of usage in credits. {{ className: 'lead' }}
-
## Resource pricing
- vCPU: $0.000014 per second (~$0.05 per hour)
- GB RAM: $0.0000045 per second (~$0.018 per hour)
@@ -18,7 +18,8 @@ We charge you based on your real sandbox usage. All new users get one-time free
## Plans
Additionally to the usage costs, you can also select a tier that includes dedicated support, prioritized features, and customizable sandbox machine specs.
-### Hobby tier (usage costs)
+### Hobby tier ($0/month + usage costs)
+
- One-time $100 of usage in credits
- Community support
- 1 hours max sandbox session length
@@ -28,13 +29,12 @@ Additionally to the usage costs, you can also select a tier that includes dedica
- 512 MB RAM
- 1 GB free disk storage
-### Pro tier ($150 per month + usage costs)
-
-
+### Pro tier ($150/month + usage costs)
+
- One-time $100 of usage in credits
- Dedicated Slack channel with live Pro support from our team
- Prioritized features
-- Customize your sandbox machine specs based on your needs
+- Customize your sandbox machine specs based on your needs ([let us know](/getting-help))
- 24 hours max sandbox session length
- Up to 100 concurrently running sandboxes
- Pro sandbox machine specs:
@@ -43,4 +43,4 @@ Additionally to the usage costs, you can also select a tier that includes dedica
- 5 GB free disk storage
-If you need more resources, please [reach out to us](/getting-help) with your use case.
+If you need any additional features or resources, please [reach out to us](/getting-help) with your use case.
diff --git a/apps/docs/src/app/sandbox/overview/features.tsx b/apps/docs/src/app/sandbox/overview/features.tsx
index c1ca9cf94..d90a9d7d0 100644
--- a/apps/docs/src/app/sandbox/overview/features.tsx
+++ b/apps/docs/src/app/sandbox/overview/features.tsx
@@ -1,13 +1,13 @@
/* eslint-disable react/jsx-key */
-import Link from 'next/link';
+import Link from 'next/link'
export const features = [
Open-source sandbox for LLM
,
- "A full VM environment",
- "No need for orchestration or infrastructure management",
- "Ability to give each user of your AI app their own isolated environment",
+ 'A full VM environment',
+ 'No need for orchestration or infrastructure management',
+ 'Ability to give each user of your AI app their own isolated environment',
Python & Node.js SDK
@@ -22,7 +22,7 @@ export const features = [
, and more.
,
- "Support for up to 24h long-running sandbox sessions",
+ 'Support for up to 24h long-running sandbox sessions',
Ability to upload files to the sandbox and download files from the sandbox,
,
diff --git a/apps/docs/src/components/Banner.tsx b/apps/docs/src/components/Banner.tsx
index de6c8c867..8162ad45a 100644
--- a/apps/docs/src/components/Banner.tsx
+++ b/apps/docs/src/components/Banner.tsx
@@ -10,21 +10,21 @@ interface Promo {
validTo: string
}
-const fetcher = (url: string) => fetch(url).then((res) => res.json());
+const fetcher = (url: string) => fetch(url).then((res) => res.json())
export function Banner() {
const { user } = useUser()
const { data, error, isLoading } = useSWR(`/docs/pricing/promo?${new URLSearchParams({ id: user?.pricingTier.id })}`, fetcher)
- if (isLoading) return null;
+ if (isLoading) return null
if (error) {
console.error('Error fetching promo:', error)
- return null;
+ return null
}
- if (!user?.pricingTier.isPromo) return null;
+ if (!user?.pricingTier.isPromo) return null
return (