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.5"; 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.5 — Large Language Model

What is GPT 5.5?

GPT 5.5 is OpenAI's flagship frontier language model, released in April 2026. It combines advanced chain-of-thought reasoning, native vision capabilities, and a 1M+ token context window into a single synchronous API endpoint — making it one of the most capable models available for enterprise-grade AI workflows.

Available through the Segmind API at /v1/gpt-5.5, GPT 5.5 accepts both text and image inputs, making it suitable for everything from autonomous coding pipelines to multi-document research synthesis. It is purpose-built for complex, multi-step workflows requiring minimal human prompting — scoring 82.7% on Terminal-Bench 2.0, OpenAI's most decisive benchmark for agentic CLI task execution.

Key Features

  • 1M+ token context window (922K input / 128K output) — process entire codebases, legal contracts, or research corpora in a single API call
  • Native vision — analyze technical diagrams, screenshots, charts, and mixed-media documents natively
  • Five reasoning effort levels — tune compute intensity vs. latency per task type
  • 40% token efficiency gain over GPT-5.4 — complex tasks cost ~20% more despite higher per-token rates
  • Synchronous API — direct JSON response with no polling required
  • Strongest safety safeguards in the GPT-5.x series

Best Use Cases

  • Autonomous coding agents: terminal workflow planning, issue resolution, test prediction — 82.7% on Terminal-Bench 2.0
  • Scientific and technical research: drug discovery, multi-document synthesis, lab report interpretation
  • Multimodal document understanding: PDFs with mixed diagrams, charts, and structured tables (88.3% on MMMU benchmark)
  • Long-context analysis: contract review, codebase refactoring, literature surveys using the full 1M context
  • Enterprise automation: multi-step software operation, spreadsheet and document generation, online research

Prompt Tips and Output Quality

For best results, give GPT 5.5 clear multi-step instructions in a single prompt — it handles complex chained reasoning natively. For vision tasks, pass the image URL in the image parameter and include a specific extraction question in prompt. Use structured output requests (e.g., "Return a JSON array with fields: title, summary, category") for downstream processing. For reasoning-heavy tasks, explicitly ask the model to think through the problem step by step before giving a final answer.

GPT 5.5 uses 72% fewer output tokens than Claude Opus 4.7 on equivalent coding tasks — making it especially cost-efficient for high-volume pipelines.

FAQs

What is GPT 5.5? GPT 5.5 is OpenAI's frontier language model with a 1M+ token context window, native vision, and advanced agentic reasoning — available via the Segmind API.

How does GPT 5.5 differ from GPT 5.4? GPT 5.5 delivers 40% higher token efficiency, stronger autonomous performance (especially on multi-step agentic workflows), and improved multimodal reasoning compared to GPT-5.4.

Can GPT 5.5 analyze images? Yes — pass an image URL in the image parameter. GPT 5.5 handles diagrams, screenshots, charts, and mixed-media documents with near-human accuracy.

How does GPT 5.5 compare to Claude Opus 4.7? GPT 5.5 leads on agentic benchmarks (Terminal-Bench 2.0: 82.7%) and uses 72% fewer output tokens. Claude Opus 4.7 edges ahead on pure code correctness (SWE-bench). For speed-critical agentic pipelines, GPT 5.5 is typically the better fit.

What is the context window for GPT 5.5? The context window is 1M+ tokens — approximately 922K input tokens and 128K output tokens — ideal for large-scale document processing.

Is GPT 5.5 available via API? Yes — access GPT 5.5 via the Segmind API at https://api.segmind.com/v1/gpt-5.5 using your Segmind API key.