Stemfard can return step-by-step solutions in multiple formats so you can render them however your application requires. Whether you are building a web UI that needs HTML markup, a document system that requires LaTeX typesetting, or an accessibility feature that feeds output to a text-to-speech engine, you control the format through theDocumentation Index
Fetch the complete documentation index at: https://docsa.stemfard.com/llms.txt
Use this file to discover all available pages before exploring further.
steps_output_formats request parameter.
Requesting output formats
Setsteps_output_formats to an array of one or more format strings in your request body. The steps array in the response will then include content rendered in each format you specified.
The three formats
- html
- latex
- speech
The Example step output:
html format wraps mathematical expressions and step text in standard HTML markup. Use this when you are rendering solutions directly into a web page without a dedicated math typesetting library.Request:cURL
html step output
Combining multiple formats
You can include any combination ofhtml, latex, and speech in a single request. Each step in the response will contain the expression rendered in every format you requested.
cURL (all three formats)
multi-format step output
Including background theory
Setsteps_bg: true in your request to include background theory notes alongside each step. These notes explain the mathematical rule or concept being applied, which is useful for learners who need more context than the step expression alone provides.
cURL (with background theory)
steps_bg is enabled, each step object includes an additional background field:
step with background theory
steps_bg requires api_level to be "standard" or "detailed", since lite responses do not include a steps array.Parameter reference
steps_output_formats
steps_output_formats
Type:
string[]Default: [""] (no formatted output)An array of format identifiers controlling how step expressions are rendered. Accepted values are "html", "latex", and "speech". Pass an empty array or omit the parameter to receive steps without a specific output format applied.steps_bg
steps_bg
Type:
booleanDefault: trueWhen true, each step object includes a background field containing an explanation of the mathematical concept or rule used in that step. Requires api_level: "standard" or api_level: "detailed".