Threads AI

usd

A US-dollar amount as the integer nano-dollars budgets and prices use: usd(0.5) is 500000000.

Rounded to the nearest nano-dollar.

Import from @threads/core (TypeScript) or threads (Python).

function usd(dollars: number): Int

Parameters

dollarsnumberrequired

The amount in dollars; finite and not negative, else ConfigError invalid_config.

Returns

Int

Throws ConfigError for a definition that can't run.

Edit on GitHub

On this page