SubNP Logo
무료 API

AI 이미지를 생성합니다 프로그래밍 방식으로

AI 이미지 생성을 응용 프로그램에 통합하려면 무료 API에 액세스하십시오. 포괄적 인 문서와 간단한 통합.

API 상태

Advertisement
개발자 API

AI로 응용 프로그램에 전원을 공급하십시오

강력한 AI 이미지 생성 기능을 무료 및 개발자 친화적 인 API와 함께 애플리케이션에 통합하십시오.

실시간 생성

SSE (Server-Sent Events)로 이미지 생성 진행 상황에 대해 실시간 업데이트를 받으십시오.

여러 모델

다양한 사용 사례 및 스타일에 최적화 된 다양한 AI 모델 중에서 선택하십시오.

무료로 사용할 수 있습니다

당신의 요구가 커짐에 따라 무료 계층과 규모로 시작하십시오.

POST/api/free/generate
// Make the request
const response = await fetch("/api/free/generate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    prompt: "A beautiful sunset over mountains",
    model: "turbo"
  })
});

// Create event source for streaming updates
const reader = response.body
  .pipeThrough(new TextDecoderStream())
  .pipeThrough(new TransformStream({
    transform(chunk, controller) {
      // Parse SSE data
      const lines = chunk.split('\n');
      const messages = lines
        .filter(line => line.startsWith('data: '))
        .map(line => JSON.parse(line.slice(6)));
      
      messages.forEach(data => {
        switch (data.status) {
          case 'processing':
            console.log('Progress:', data.message);
            break;
          case 'complete':
            console.log('Image URL:', data.imageUrl);
            break;
          case 'error':
            console.error('Error:', data.message);
            break;
        }
      });
    }
  }));

// Start reading the stream
reader.read();
쉬운 통합
JSON 응답으로 간단한 휴식 API
여러 모델
다양한 AI 모델 중에서 선택하십시오
사용 통계
API 사용량을 모니터링하십시오

기본 URL

https://t2i.mcpcore.xyz

API 엔드 포인트

GET/api/free/models
Get a list of available image generation models.
// Fetch available models
const response = await fetch("https://subnp.com/api/free/models");
const data = await response.json();

// Example response:
{
  success: true,
  models: [
    { model: "turbo", provider: "MitraAi" },
    { model: "flux", provider: "MitraAi" },
    { model: "magic", provider: "MagicStudio" }
  ]
}
GET/api/free/stats
Get API usage statistics.
// Fetch API statistics
const response = await fetch("https://subnp.com/api/free/stats");
const data = await response.json();

// Example response:
{
  timestamp: "2024-01-01T00:00:00Z",
  totalRequests: 1250,
  successRate: 98.5,
  lastHourRequests: 45
}
    무료 API | AI 이미지 생성 API | Subnp