Responses
Create Responses
POST/v1/responses
Creates a model response. Provide text or image inputs to generate text or JSON outputs. Compatible with OpenAI Create Response API
Request
Text input Request
curl -X POST https://api.ig1.ai/v1/responses \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen35-397b-a17b-instruct-general",
"input": "Write me a nice poem about DevOps."
}'
Other option
curl -X POST https://api.ig1.ai/v1/responses \
-H "Authorization: Bearer $IG1AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen35-397b-a17b-instruct-general",
"input": [
{ "role": "user", "content": "Write me a nice poem about DevOps." }
]
}'
Image input request
curl -X POST https://api.ig1.ai/v1/responses \
-H "Authorization: Bearer $IG1AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen35-397b-a17b-instruct-general",
"input": [
{
"role": "user",
"content": [
{"type": "input_text", "text": "Describe this image"},
{
"type": "input_image",
"image_url": "data:image/png;base64,<BASE64_ENCODED_IMAGE_DATA>"
}
]
}
]
}'
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | ✅ | Model ID (see LLM Models) |
input | string or array | ✅ | String or Array of input objects (role + content) |
stream | boolean | Enable streaming (true/false) | |
temperature | float | Sampling temperature | |
top_p | float | Nucleus sampling | |
max_tokens | integer | Maximum tokens to generate |
Extra sampling parameters
The following additional sampling parameters are supported:
| Parameter | Type | Description |
|---|---|---|
use_beam_search | bool | Enables beam search over sampling. |
top_k | int | Limits sampling to top K tokens (1 to Vocabulary_size). |
min_p | float | Minimum probability relative to top token (0.0 to 1.0). |
repetition_penalty | float | Penalizes repeated tokens (from 1.0). |
length_penalty | float | Adjusts sequence length in beam search (from 0.0 to 2.0+). |
stop_token_ids | list[int] | Tokens that trigger generation end (e.g., []). |
include_stop_str_in_output | bool | Keeps stop strings in final text. |
ignore_eos | bool | Forces generation past EOS token. |
min_tokens | int | Minimum tokens to generate (0 to max_tokens). |
skip_special_tokens | bool | Removes special tokens from output. |
spaces_between_special_tokens | bool | Adds spacing between special tokens. |
truncate_prompt_tokens | int | Limits prompt length by truncating (from 1 to max_context). |
prompt_logprobs | int | Returns logprobs for prompt tokens (e.g., null). |
allowed_token_ids | list[int] | Restricts output to specific tokens (typical values: 0 to 5). |
bad_words | list[string] | Prohibits specific words in output. |
Response
Text Response
{
"background": false,
"created_at": 1775114826,
"id": "resp_826146982537",
"incomplete_details": null,
"input_messages": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"metadata": null,
"model": "qwen35-397b-a17b-instruct-general",
"object": "response",
"output": [
{
"content": [
{
"annotations": [],
"logprobs": null,
"text": "In a meadow bathed in moonlight...",
"type": "output_text"
}
],
"id": "msg_826146964620",
"phase": null,
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"output_messages": null,
"output_text": "In a meadow bathed in moonlight,...",
"parallel_tool_calls": true,
"previous_response_id": null,
"prompt": null,
"reasoning": null,
"service_tier": "auto",
"status": "completed",
"temperature": null,
"text": null,
"tool_choice": "auto",
"tools": [],
"top_logprobs": null,
"top_p": null,
"truncation": "disabled",
"usage": {
"input_tokens": 23,
"input_tokens_details": {
"cached_tokens": 0,
"cached_tokens_per_turn": [],
"input_tokens_per_turn": []
},
"output_tokens": 70,
"output_tokens_details": {
"output_tokens_per_turn": [],
"reasoning_tokens": 0,
"tool_output_tokens": 0,
"tool_output_tokens_per_turn": []
},
"total_tokens": 93
},
"user": null
}
Image Response
{
"id": "resp-beb77eb36e222299",
"object": "responses",
"created": 1773745771,
"model": "qwen35-397b-a17b-instruct-general",
"output": [
{
"type": "message",
"id": "msg-XXXXXX",
"role": "assistant"
"content": {
"type": "output_text",
"text": "The image represents a portrait ...",
"annotations": []
},
"finish_reason": "stop"
}
],
"usage": {
"input_tokens": 128,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 358,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 486
}
}
Unsupported OpenAI endpoints
warning
IG1 AI does not store any chat history or data. That is why following endpoints are not supported:
- Retrieve a Response: GET
/v1/responses/{response_id}, - Delete a response: DELETE
/v1/responses/{id}, - List input items: GET
/v1/responses/{response_id}/input_items - Count input tokens: POST
/v1/responses/input_tokens - Cancel a response: POST
/v1/responses/{id}/cancel - Compact a response: POST
/v1/responses/compact