Short path: OpenAI-compatible API · API documentation · Available models · Python guide
Last verified: August 3, 2026
To test an OpenAI-compatible API in Postman, create a POST request to /v1/chat/completions, use Bearer authentication, send a raw JSON body with a valid model ID and inspect choices[0].message.content in the response. Postman is useful here because it separates endpoint, authentication, payload and response problems without requiring an SDK.
For LumeAPI, use https://api.lumeapi.site/v1/chat/completions. The key used for model inference is not the Research publishing key.
The five-minute setup
Create an HTTP request in Postman with these values:
| Field | Value |
|---|---|
| Method | POST |
| URL | {{lumeapi_base_url}}/chat/completions |
| Authorization type | Bearer Token |
| Token | your private lumeapi_api_key value |
| Body | raw → JSON |
| Content-Type | application/json |
Create an environment variable named lumeapi_base_url with the value:
https://api.lumeapi.site/v1Store the API key in Postman Vault or as a secure local variable. Do not paste a real key into a shared collection, example response, screenshot or exported environment.
Use this request body:
{
"model": "gpt-5.4-mini",
"messages": [
{
"role": "system",
"content": "Answer accurately and in no more than three sentences."
},
{
"role": "user",
"content": "Explain what an API gateway does."
}
],
"temperature": 0
}Click Send. A successful response should contain an ID, a model field, a choices array and usually a usage object. The generated text is normally at:
choices[0].message.contentAdd Postman checks so a 200 response is not mistaken for success
Open the post-response script area and add:
pm.test("status is 200", () => {
pm.response.to.have.status(200);
});
pm.test("response contains assistant text", () => {
const data = pm.response.json();
pm.expect(data.choices).to.be.an("array").that.is.not.empty;
pm.expect(data.choices[0].message.content).to.be.a("string").and.not.empty;
});
pm.test("usage is non-negative when returned", () => {
const usage = pm.response.json().usage;
if (usage) {
pm.expect(usage.prompt_tokens).to.be.at.least(0);
pm.expect(usage.completion_tokens).to.be.at.least(0);
}
});These checks catch proxy error pages, empty provider responses and unexpected response shapes. They also make a saved collection useful for regression testing after changing a model or base URL.
Test model discovery separately
Create a second request:
GET {{lumeapi_base_url}}/modelsUse the same Bearer token. Copy an exact model ID from the response before changing the chat request. This isolates a common failure: authentication and the endpoint work, but the selected model name does not.
Do not assume that a model name found in a blog post is still available. Treat the live model catalog and authenticated model-list response as the source of truth.
Import the request from cURL
Postman can import cURL. Replace the placeholder locally before sending, but never save the real key in a shared collection:
curl https://api.lumeapi.site/v1/chat/completions \
-H "Authorization: Bearer YOUR_LUMEAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model":"gpt-5.4-mini",
"messages":[{"role":"user","content":"Reply with: connection ok"}],
"temperature":0
}'Importing is convenient, but move the imported key into Vault or a secure variable immediately. The request history and generated snippets can otherwise expose it.
Diagnose failures by layer
| Symptom | Likely cause | User action |
|---|---|---|
| Postman cannot send | DNS, proxy, TLS or local network issue | Open the Postman Console and inspect the transport error |
401 | Missing, invalid or incorrectly prefixed key | Select Bearer Token and verify the inference key |
404 | Wrong base URL, route or model | Confirm /v1/chat/completions and call /v1/models |
400 | Invalid JSON or unsupported request field | Reduce the body to model plus one user message |
429 | Rate or account limit | Respect retry guidance; do not hammer Send repeatedly |
5xx | Transient gateway or upstream failure | Save request ID and response, then retry with a bound |
200 but no text | Unexpected response shape or provider behavior | Inspect raw JSON and keep the Postman assertion |
If the minimal request succeeds but your application fails, compare the application's actual URL, headers and JSON with Postman. If both fail identically, the issue is probably outside the SDK.
Turn the test into a reusable collection
Keep three requests in one collection:
List Models— confirms key, route and model discovery.Minimal Chat— confirms the basic response contract.Application Payload— mirrors the real prompt and optional fields.
Use separate environments for development and production. Keep base URLs and non-secret model IDs in environment variables; keep credentials in Vault. Add tests for the fields your application actually consumes, not every field that happens to appear today.
Postman is a diagnostic client, not the production architecture. Once the contract is proven, move the same values into the server-side SDK or HTTP client described in the OpenAI-compatible API guides.
Sources and verification boundary
- Postman: create and send API requests
- Postman variables and secure values
- Postman request troubleshooting
- LumeAPI documentation
The request structure, test script and public LumeAPI routes were checked on August 3, 2026. No private inference key is embedded in this page; run the minimal request with your own key before saving or sharing a collection.