Skip to main content
You are reading the docs of Galtea 5.14. Read this page in the latest version.

Returns

Returns a Model object for the given parameters, or None if an error occurs. When the platform stores it but cannot return it, create raises WrittenResourceUnreadableException instead: do not create it again.

Example

Parameters

string
required
Name of the model. Must be unique within your organization.
float
Cost in dollars per input token.
float
Cost in dollars per output token.
float
Cost in dollars per cached input token. Some providers offer reduced rates for cached requests.
float
Cost in dollars per input token when creating a cache entry.
float
Cost in dollars per input token for contexts larger than 128k tokens, if applicable.
float
Cost in dollars per output token for contexts larger than 128k tokens, if applicable.
string
Provider of the tokenizer used by the model. Examples: "OpenAI" (uses tiktoken), "Anthropic" (uses anthropic-tokenizer).
string
The provider or source of the pricing model. This can be a URL to the model’s pricing page or documentation (e.g., https://openai.com/api/pricing/).