I tried using the LLMFunction in Mathematica 14.0 using e.g. the example given in its documentation.

Before this, I logged into my Wolfram account as suggested by @Nasser here and provided the key for my free/unpaid OpenAI account.

I consistently receive the error message below. This suggests I cannot use the Mathematica LLMFunction without having a paid OpenAI account with available tokens. However, both the Mathematica documentation and the quoted answer by Nasser are unclear on this.

Can anybody please let me know if they have been able to use the Mathematica LLM functionality without a paid OpenAI account (without providing payment details), and how? Is this possible at all?

enter image description here

The link given in the Mathematica error message, given below, suggests indeed that one needs to have a paid account. If this is the case, I am surprised this fact is not clearly highlighted in the Mathematica documentation.

enter image description here

  • 5
    $\begingroup$ Well ... The second bullet point in the documentation for LLMFunction (Details and Options) states: "LLMFunction requires external service authentication, billing and internet connectivity." ... $\endgroup$
    – Domen
    Jan 15 at 11:49
  • 3
    $\begingroup$ That's quite a hidden and ambiguous manner to state that to use a key Mathematica functionality one requires to subscribe to a service, in addition to the Mathematica license! This means any person without a credit card, or unwilling to subscribe to OpenAI, cannot use some of the key innovations of the latest versions of Mathematica. I hope others can confirm. $\endgroup$
    – divenex
    Jan 15 at 11:59
  • 3
    $\begingroup$ Personally, I would only bother trying it out I could configure it to use ollama or some other offline solution. I won't accept OpenAI's terms of use and privacy policy, or pay them, so this whole block of Mathematica functionality is off limits to me for the time being. Also there's a bug in the Preferences > AI Settings. If you don't supply an API key and just click the [x], it messes up the UI. However, after some attempts, it eventually went away and revealed that you can change the service to Anthropic or PaLM, whatever they are, but no option to use an offline service. $\endgroup$
    – flinty
    Jan 15 at 12:22
  • 2
    $\begingroup$ @flinty has a fun idea about faking OpenAI. I'm aware of a project to do this (you'd have to also modify hosts) localai.io Perhaps also worth noting is a discussion at community have demo'd playing with ollama, etc. community.wolfram.com/groups/-/m/t/3097299 (albeit without using the "built in" functions) $\endgroup$ Jan 15 at 23:06
  • 1
    $\begingroup$ You can get an API key for other models basically for free. Then use LLMEvaluator -> LLMConfiguration["Model" -> "gpt-3.5-turbo"] as an option in LLMFunction. $\endgroup$
    – Sam Gralla
    Jan 29 at 3:59

1 Answer 1


According to Wolfram documentation, the following four functions say the following in the help page for each

requires external service authentication, billing and internet connectivity.

These are the functions

ImageSynthesize used to generate a synthetic image based on a textual description or a reference image

LLMFunction used to generate text using a large language model (LLM)

TextSummarize used to condense textual information.

LLMResourceFunction can retrieve resources stored locally, in the cloud or in the Wolfram Prompt Repository.

  • 1
    $\begingroup$ I interpret this as a YES: To use any LLM functionality one needs an OpenAI subscription and must pay extra for every function call. This makes it useless for most people. It is disappointing that this is not stated more explicitly in the documentation. $\endgroup$
    – divenex
    Jan 17 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.