openai

OpenAI: GPT 4.1

models/GPT-4.1

GPT 4.1 is a flagship large language model optimized for advanced instruction following, real world software engineering, and long context reasoning. It supports a 1 million token context window and outperforms GPT 4o and GPT 4.5 across coding (54.6% SWE bench Verified), instruction compliance (87.4% IFEval), and multimodal understanding benchmarks. It is tuned for precise code diffs, agent reliability, and high recall in large document contexts, making it ideal for agents, IDE tooling, and enterprise knowledge retrieval.
Currency$USD
Input$2.00
Output$8.00
Context window1M

Generate API Key Generate your API Key to securely access IndoxHub's AI models. Integrate with OpenAI-compatible tools, run queries, and build powerful AI applications — all with a single secure key.
Endpoint
POSThttps://api.indoxhub.com/api/v1/chat/completions
Configopenai/gpt-4.1
from indoxhub import Client
 
# Initialize the client
with Client(api_key="[LOGIN TO GET API KEY]") as client:
    # Generate a chat completion
    response = client.chat(
        messages=[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"What is machine learning and why is it important?"}],
        model="openai/gpt-4.1",
        temperature:"0.7"
    )
 
    # Print the response
    print(response["data"])