Skip to main content

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

ParameterTypeRequiredDescription
modelstringModel ID (see LLM Models)
inputstring or arrayString or Array of input objects (role + content)
streambooleanEnable streaming (true/false)
temperaturefloatSampling temperature
top_pfloatNucleus sampling
max_tokensintegerMaximum tokens to generate

Extra sampling parameters

The following additional sampling parameters are supported:

ParameterTypeDescription
use_beam_searchboolEnables beam search over sampling.
top_kintLimits sampling to top K tokens (1 to Vocabulary_size).
min_pfloatMinimum probability relative to top token (0.0 to 1.0).
repetition_penaltyfloatPenalizes repeated tokens (from 1.0).
length_penaltyfloatAdjusts sequence length in beam search (from 0.0 to 2.0+).
stop_token_idslist[int]Tokens that trigger generation end (e.g., []).
include_stop_str_in_outputboolKeeps stop strings in final text.
ignore_eosboolForces generation past EOS token.
min_tokensintMinimum tokens to generate (0 to max_tokens).
skip_special_tokensboolRemoves special tokens from output.
spaces_between_special_tokensboolAdds spacing between special tokens.
truncate_prompt_tokensintLimits prompt length by truncating (from 1 to max_context).
prompt_logprobsintReturns logprobs for prompt tokens (e.g., null).
allowed_token_idslist[int]Restricts output to specific tokens (typical values: 0 to 5).
bad_wordslist[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