LogoFreestyle
API Reference/Dev servers

Request a Dev Server

POST
/ephemeral/v1/dev-servers

Request Body

application/jsonRequired
devCommandstring | null
installCommandstring | null
preDevCommandOncestring | null
baseIdDeprecatedstring | null
envVarsobject | null
repoIdstring | null
computeClassstring | null
Default: "high"
timeoutinteger | null

Timeout in seconds

Minimum: 0Format: "int64"
domainDeprecatedstring | null
repoDeprecatedstring | null
gitRefstring | null
portsarray | null

Optional list of ports to expose externally. If not provided, port 3000 will be exposed on port 443 by default. Pass an empty array to disable external ports. Only ports 8081 and 443 can be configured externally for now. Any target port is allowed.

Response Body

200

Successful

urlRequiredDeprecatedstring
isNewRequiredboolean
devCommandRunningRequiredboolean
installCommandRunningRequiredboolean
mcpEphemeralUrlstring | null
ephemeralUrlstring | null

500

Internal Server Error

responseRequiredstring
curl -X POST "https://api.freestyle.sh/ephemeral/v1/dev-servers" \
  -H "Content-Type: application/json" \
  -d '{
    "devCommand": "string",
    "installCommand": "string",
    "preDevCommandOnce": "string",
    "baseId": "string",
    "envVars": {
      "RESEND_API_KEY": "re_123456789"
    },
    "repoId": "string",
    "computeClass": "low",
    "timeout": "30",
    "domain": "string",
    "repo": "string",
    "gitRef": "string",
    "ports": [
      {
        "port": 0,
        "targetPort": 0
      }
    ]
  }'

Successful

{
  "url": "string",
  "isNew": true,
  "devCommandRunning": true,
  "installCommandRunning": true,
  "mcpEphemeralUrl": "string",
  "ephemeralUrl": "string"
}

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.