> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelhunter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses (GPT, Grok, DeepSeek, Kimi)

> Chat with GPT, Grok, DeepSeek and Kimi models through the OpenAI Responses API format — works with the official OpenAI SDKs.

This endpoint speaks the **OpenAI Responses API** format: request body, response body, streaming events and error
shapes are the same as OpenAI's. Point the official OpenAI SDK at our base URL and use your ModelHunter.AI API key.

## Models

| Model | Input / 1M tokens | Output / 1M tokens | Cached input / 1M tokens |
| - | - | - | - |
| `gpt-6-2-astra` | \$8 | \$40 | \$0.40 |
| `gpt-6-2-sol` | \$2 | \$10 | \$0.10 |
| `gpt-6-1-terra` | \$1 | \$5 | \$0.05 |
| `grok-4-7` | \$2 | \$6 | \$0.50 |
| `deepseek-v4-1-flash` | \$0.30 | \$1.20 | \$0.006 |
| `kimi-k3-1-pro` | \$2 | \$10 | \$0.20 |

> [!NOTE]
>
> GPT models also bill prompt-cache writes at the official cache-write rate. Output includes reasoning tokens.

```python Python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.modelhunter.ai/api/v1",
)

response = client.responses.create(
    model="gpt-6-2-sol",
    input="Hello!",
)
print(response.output_text)
```

```javascript JavaScript theme={null}
import OpenAI from 'openai'

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.modelhunter.ai/api/v1',
})

const response = await client.responses.create({
  model: 'gpt-6-2-sol',
  input: 'Hello!',
})
console.log(response.output_text)
```

```bash cURL theme={null}
curl https://api.modelhunter.ai/api/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "gpt-6-2-sol", "input": "Hello!" }'
```

## Body Parameters

The body follows the OpenAI Responses API. The most common fields:

**model** `string` *required*

One of the models above.

**input** `string | object[]` *required*

A prompt string, or a list of input items (messages with text / image content, tool outputs).

**instructions** `string`

System instructions.

**max\_output\_tokens** `integer`

Maximum output tokens, including reasoning.

**stream** `boolean` (default: false)

Stream the response as Responses server-sent events (`response.output_text.delta`, `response.completed`, …).

**temperature** `number`

Sampling temperature (not supported by every reasoning model).

**tools** `object[]`

Function tool definitions, in OpenAI Responses format.

Other Responses fields (`reasoning`, `text`, `tool_choice`, `top_p`, `metadata`) are passed through unchanged.

> [!WARNING]
>
> `deepseek-v4-1-flash` and `kimi-k3-1-pro` currently support chat requests; tool calling for agents may not work yet.

## Long requests and streaming

> [!TIP]
>
> **Use `"stream": true` for reasoning models and long outputs.** Tokens arrive as they are generated, so long
> answers never sit idle on the connection. While a stream is waiting for the model (for example while it is
> thinking), we send `: keepalive` SSE comments every 15 seconds; SSE clients and the official SDKs ignore them.
>
> Non-streaming requests that take longer than 15 seconds are also kept alive: the response starts with
> `200 OK` and leading whitespace (ignored by JSON parsers) until the result is ready. If such a request fails
> after that point, the error is returned in the response body with status `200` instead of an error status,
> so check the body for an `error` field.

## Billing

Each call is billed per token at the official price. When the request starts, an upper bound on its cost is
held from your balance (estimated input + output limit; at least 8,192 output tokens for Grok, DeepSeek and Kimi,
whose reasoning is not capped by `max_output_tokens`). When it finishes you are charged for the tokens actually used
and the rest is released. Failed requests are not charged.

```json 200 theme={null}
{
  "id": "resp_67ab...",
  "object": "response",
  "model": "gpt-6-2-sol",
  "status": "completed",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [{ "type": "output_text", "text": "Hello! How can I help you today?" }]
    }
  ],
  "usage": { "input_tokens": 9, "output_tokens": 12, "total_tokens": 21 }
}
```

```json 400 theme={null}
{
  "error": {
    "message": "Model \"claude-sonnet-5-5\" is not available on this endpoint. Use POST /v1/messages for this model.",
    "type": "invalid_request_error",
    "code": null
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.