Run code with the code interpreter
Have Python run server-side and get the output plus generated files back — for example, to compute, analyze data, or generate a plot. You need this when the answer requires actual execution, not just generation.
Prerequisites
Section titled “Prerequisites”- The
pi-mistral-nativepackage installed - An API key configured (Set up your API key)
-
Describe the task in plain language:
Plot sin(x) over one period and give me the PNG.mistral_code_interpretertakes aprompt— what to compute, analyze or generate; the code itself is written server-side. -
Read the result — the executed code, captured output and generated files arrive as download links.
See Tools · Configuration keys