Standard Setup

    Fully compatible with the OpenAI API. Supports Python, Node.js, curl, and tools across the ecosystem.

    Replace the Base URL ( https://api.gate.ai/openai/v1 ) and API key to start using it.

    1from openai import OpenAI2client = OpenAI(3api_key="GATEAI_API_KEY",  # get GATEAI_API_KEY from gate.ai (API Key)4base_url="https://api.gate.ai/openai/v1",5)6completion = client.chat.completions.create(7model="auto",8messages=[9{"role": "system", "content": "system prompt"},10{"role": "user", "content": "how are you?"}11],12)

    Response example

    json
    1{2    "id": "243c850e-214c-431e-977f-ebaf4aa95f56",3    "choices": [4        {5            "index": 0,6            "message": {7                "role": "assistant",8                "content": "Hello! Nice to meet you. How can I help you?"9            },10            "finish_reason": "stop"11        }12    ],13    "created": 1773408946,14    "model": "deepseek.v3-v1:0",15    "object": "chat.completion",16    "usage": {17        "prompt_tokens": 5,18        "completion_tokens": 15,19        "total_tokens": 2020    }21}