AIGC558AIGC558
User GuideAPI ReferenceAI ApplicationsBusiness Cooperation

Quick Start

AIGC558 provides a unified API that supports calling AI models from multiple providers, including chat, image generation, and video generation. This guide helps you complete your first API call quickly.

Step 1: Create an Account

Visit aigc558.cn to register your account.

Step 2: Get Your API Key

Go to the Console to generate your API key. Keep it safe—you'll need it for authentication with every request.

Step 3: Make Your First API Call

Use your API key to call a chat model. The following example uses the OpenAI-compatible interface to call Claude 3.5 Sonnet:

curl https://www.aigc558.cn/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-3-5-sonnet",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://www.aigc558.cn/v1"
)

response = client.chat.completions.create(
    model="claude-3-5-sonnet",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://www.aigc558.cn/v1',
});

const response = await client.chat.completions.create({
  model: 'claude-3-5-sonnet',
  messages: [
    { role: 'user', content: 'Hello!' }
  ],
});

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