GateOne Development Manual

Simple and easy to use, compatible with OpenAI SDK

Quick Start

Base URL

https://api.gateone.ai/v1

Install Dependencies

pip install openai

Python Example

from openai import OpenAI

client = OpenAI(
    api_key = "YOUR_API_KEY",
    base_url = "https://api.gateone.ai/v1"
)

chat_completion = client.chat.completions.create(
    messages=[{"role": "user", "content": "Tell me a joke"}],
    model="gpt-4o-mini",
)

print(chat_completion.choices[0].message.content)

JavaScript Example

import OpenAI from 'openai';

const openai = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.gateone.ai/v1',
});

const chatCompletion = await openai.chat.completions.create({
  messages: [
    { role: 'user', content: 'Tell me a joke' },
  ],
  model: 'gpt-4o-mini',
});

console.log(chatCompletion.choices[0].message.content);

cURL Example

curl https://api.gateone.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Tell me a joke"}]
  }'

Supported Models

OpenAI

  • GPT-4
  • GPT-4o
  • GPT-3.5-turbo

Anthropic

  • Claude-3
  • Claude-2

Google

  • Gemini Pro
  • Gemini Flash

Meta AI

  • Llama 3
  • Llama 2

DeepSeek

  • DeepSeek Coder
  • DeepSeek Chat

Mistral

  • Mistral Large
  • Mistral Medium

Baidu

  • 文心一言
  • 文心一言 Pro

Xunfei

  • 星火认知大模型

Baichuan

  • 百川大模型

Capabilities

Text Generation

Advanced text generation with context awareness

Function Calling

Structured function calling for complex workflows

Embeddings

High-quality text embeddings for semantic search

Image Generation

AI-powered image creation and editing

Vision Capabilities

Image analysis and visual understanding

Text-to-Speech

Natural speech synthesis from text

Speech-to-Text

Accurate speech recognition and transcription

Content Moderation

AI-powered content safety and moderation

Ecosystem Integration

LangChain

Seamless integration with LangChain for building AI applications.

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    openai_api_key="YOUR_API_KEY",
    openai_api_base="https://api.gateone.ai/v1"
)

LlamaIndex

Build RAG applications with LlamaIndex and our models.

from llama_index.llms import OpenAI

llm = OpenAI(
    api_key="YOUR_API_KEY",
    api_base="https://api.gateone.ai/v1"
)

Need Help?

Our technical support team is here to help you integrate and use our services effectively.