POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 const axios = require('axios'); const fs = require('fs'); const path = require('path'); // helper function to help you convert your local images into base64 format async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/gpt-5-mini"; const data = { "messages": [ { "role": "user", "content" : "tell me a joke on cats" }, { "role": "assistant", "content" : "here is a joke about cats..." }, { "role": "user", "content" : "now a joke on dogs" }, ] }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
application/json
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


messagesArray

An array of objects containing the role and content


rolestr

Could be "user", "assistant" or "system".


contentstr

A string containing the user's query or the assistant's response.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

GPT-5 Mini: Multi-Modal Language Model

Edited by Segmind Team on October 28, 2025.

What is GPT-5 Mini?

GPT-5 Mini is a streamlined and compact version of OpenAI’s GPT-5 model, that is capable of performing fast reasoning and efficient processing. It is an advanced language model that merges GPT-5’s instruction-following capabilities with high-end performance. It also supports multi-modal inputs, such as text, images, and files, while maintaining high-quality text outputs. It is a reliable choice for developers when they need quick, consistent AI responses without the heavy computational load of large models.

Key Features of GPT-5 Mini

  • It supports multi-modal input, including text, images, and files
  • It is optimized for low-latency responses
  • It has advanced instruction-following capabilities
  • It has built-in safety features from GPT-5
  • It is integrated with OpenAI API compatibility
  • It comes with Azure integration support
  • It offers streamlined architecture for efficient processing

Best Use Cases

  • Real-time chatbots and virtual assistants
  • Content analysis and summarization
  • Image-enhanced text generation
  • Educational technology applications
  • Customer service automation
  • Document processing and analysis
  • Rapid prototyping of AI features

Prompt Tips and Output Quality

  • Provide prompts with precise and detailed information for better results
  • Utilize text and images (when needed) to provide clear context
  • Structure complex queries into clear, separate instructions
  • Specify relevant context for more accurate responses
  • Frame questions precisely for analysis tasks
  • Use high-resolution images for more detailed outputs

FAQs

How does GPT-5 Mini differ from standard GPT-5? GPT-5 Mini focuses on speed and efficiency while maintaining core GPT-5 capabilities. It is designed for lighter tasks based on reasoning to execute responses faster, making it ideal for applications requiring quick processing.

Is GPT-5 Mini available through multiple providers? Yes, GPT-5 Mini can be accessed through OpenAI's API and Azure, offering flexibility in deployment options.

Can GPT-5 Mini process multiple types of input? It generates text-based outputs from multi-modal inputs, including text, images, and files.

What are the best practices for prompt engineering with GPT-5 Mini? Provide clear, specific instructions and include relevant context. For multi-modal inputs, use high-resolution images relevant to the query.

How can developers integrate GPT-5 Mini into existing applications? GPT-5 can be integrated through standard OpenAI-compatible APIs, making it accessible to developers familiar with OpenAI's ecosystem.