Skip to main content

Overview

You can use ModelStack directly with cURL or any HTTP client. No SDK required — just make standard HTTP requests.

Chat Completion

With Parameters

Streaming

Add "stream": true to get Server-Sent Events:
The -N flag disables cURL’s output buffering, allowing you to see streamed tokens in real time.

List Models

Using Different Models

Simply change the model field to switch providers:

Using Environment Variables

Set your API key as an environment variable to avoid repeating it:

Pretty-Printing JSON

Pipe the output through jq for formatted JSON:

Extracting Just the Response Text