SDKs & tools
Chat is OpenAI-SDK compatible — only base_url and the key change. Image generation uses its own REST flow because it is an asynchronous job.
OpenAI SDK
Any client that can talk to an OpenAI-compatible endpoint works with Mintform chat: the official Python and JavaScript SDKs, plus third-party wrappers that let you set a base URL.
pip install openaiimport os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MINTFORM_API_KEY"],
base_url="https://mintform.app/v1",
)
response = client.chat.completions.create(
model="gpt-5-mini",
messages=[{"role": "user", "content": "ping"}],
)
print(response.choices[0].message.content)What the SDK covers
| Capability | Via OpenAI SDK | Note |
|---|---|---|
| Chat /v1/chat/completions | yes | Fully compatible request and response shapes. |
| Streaming | yes | stream=True / stream: true, iterate the chunks. |
| Vision (image input) | yes | content parts with image_url — link or data-URI. |
| Image generation | no | Its own async REST: POST /v1/images/generations plus job polling. |
| Model listing | no | The catalog lives on the Models page and in these docs. |
Environment variables
Keep the key in MINTFORM_API_KEY (or your own equivalent) and do not mix it with OPENAI_API_KEY, or an SDK will happily point at the wrong base URL.
Postman collection
A ready collection with four requests: chat, streamed chat, image creation and job polling. Import the file and fill in two variables.
# Import the collection, then set two variables:
# base_url = https://mintform.app
# api_key = mf_live_…
# Everything else (chat, streaming, image job, job polling) is pre-wired.Download the collection: /mintform.postman_collection.json