OpenAI Chat (Kie.ai) icon

OpenAI Chat (Kie.ai)

Chat with GPT-5 and OpenAI Codex models via Kie.ai API

OpenAI Chat (Kie.ai)

AI-generated

Summary

Send a user message with optional system prompt, image URL, and prior chat history to a selected OpenAI model (GPT-5-2 or GPT Codex) via the Kie.ai API, and receive the model's chat completion response along with updated conversation history.

Inputs

  • model (required) — The OpenAI model to use for chat completions, either 'GPT-5-2 (Latest)' or 'GPT Codex'.
  • userMessage (required) — The user message text to send as part of the chat request.
  • systemPrompt — Optional system or developer instructions to guide the model's behavior.
  • imageUrl — Optional image URL to include in the user message for multimodal input.
  • chatHistory — Optional JSON array representing previous messages to continue an existing conversation, formatted as an array of objects with roles ('user' or 'assistant') and content arrays containing text segments.

Output shape

a JSON array of response objects, each containing the full API response, the model name used, the assistant's reply text, and an updated chat history array including the new user and assistant messages.

The output is returned as a JSON array with one entry per input item processed. The updated history includes all prior messages plus the latest user and assistant messages. If an error occurs and 'continue on fail' is enabled, the error message is included instead of a response object.

Links

Discussion