SamImageGenerator
로그인

API

키 하나로 여러분의 코드에서 이미지를 만드세요.

API 키를 만들려면 로그인하세요.

로그인

이미지 하나 만들기

프롬프트를 보내고 이미지를 받으세요.

# 1) Send the prompt. The endpoint does not wait for the image:
#    it queues the job and answers 202 with an id.
curl https://samimagegenerator.com/api/v1/generate \
  -H "Authorization: Bearer sig_여기에_내_키" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"a red fox in the snow","style":"realistic","aspect":"1:1","resolution":"1K","count":1,"model":"samimage-mini"}'

# 2) Ask for the result every couple of seconds until status is no longer "pending".
#    Generation takes 20-60s. Polling is safe to repeat: it never spends a credit.
curl "https://samimagegenerator.com/api/v1/generate?id=<ID>" \
  -H "Authorization: Bearer sig_여기에_내_키"

위의 키로 실제 주소에서 돌아가며 크레딧 하나를 씁니다 — 여러분의 코드가 하게 될 것과 같은 호출입니다.

응답

// 1) POST — the job is accepted, nothing is generated yet (202)
{ "ok": true, "id": "…", "status": "pending" }

// 2) GET ?id=… — while the worker is on it (200)
{ "ok": true, "status": "pending" }

// 2) GET ?id=… — finished (200)
{
  "ok": true,
  "status": "done",
  "generations": [
    { "id": "…", "model": "samimage-mini", "url": "https://samimagegenerator.com/api/generations/…/file" }
  ],
  "refunded": 0,
  // credits: null on an unlimited plan — there is no number to count down.
  "credits": 96
}

// 오류
// The job failed: HTTP is still 200 — the poll itself worked, the generation did not.
{ "ok": false, "status": "error", "error": "no-credits" }

// generation-failed / storage-failed: the credit was spent and refunded,
// so the fresh balance comes back with the error.
{ "ok": false, "status": "error", "error": "generation-failed", "credits": 96 }

// Unknown or expired id (404). Jobs are kept for one day.
{ "ok": false, "error": "not-found" }

모델

  • samimage-miniSam Mini크레딧 1개
  • samimage-maxSam Max크레딧 1개 · Max

스타일

  • realistic사실적
  • anime애니메이션
  • 3d3D
  • watercolor수채화
  • oil유화
  • pixelPixel art
  • cyberpunk사이버펑크
  • fantasy판타지
  • minimal미니멀
  • sketch연필 스케치
  • comic만화
  • cartoon카툰
  • lineart라인아트
  • lowpolyLow poly
  • isometric아이소메트릭
  • vaporwave베이퍼웨이브
  • steampunk스팀펑크
  • noir느와르
  • popartPop art
  • impressionist인상주의
  • surreal초현실
  • neon네온
  • clay점토
  • papercut종이 오리기
  • edit편집

형식

  • 1:1정사각형
  • 16:9가로
  • 9:16세로
  • 4:3표준

크기

  • 1K1024×1024
  • 2K2048×2048

필드

  • promptstring · 5000
  • style25 × string · 선택
  • aspect1:1 | 16:9 | 9:16 | 4:3 · 선택
  • resolution1K | 2K
  • count1-1
  • model2 × string
  • isPublicboolean
  • removeBgboolean
  • enhanceboolean
  • cleanboolean
  • useSeedboolean
  • sourceImagedata URI · 8 MB
  • markedImagedata URI · 8 MB
  • maskedboolean
  • regionsstring[] · 8 × 300
  • langen | de | es | fr | it | nl | pl | sv | tr | pt | hi | id | ko | ja | ar
  • referenceImages(url | data URI)[] · 4 × 8 MB

오류

  • 401unauthorized키가 없거나 더 이상 유효하지 않습니다.
  • 401browser-key이 키에는 허용된 사이트 목록이 있어 삽입 코드에 쓰는 키입니다. 서버에서 호출하려면 사이트 목록이 없는 키가 필요합니다.
  • 429too-many-requests · 30/60s시도가 너무 많습니다. 몇 분 뒤에 다시 해 주세요.
  • 200no-credits크레딧이 없습니다. 구독하거나 크레딧을 구매하면 계속 만들 수 있습니다.
  • 200no-prompt먼저 무엇을 만들고 싶은지 설명해 주세요.
  • 200not-configured지금은 이미지 생성을 쓸 수 없습니다.
  • 200generation-failed생성에 실패했습니다. 다시 시도해 주세요.
  • 200image-too-large그 이미지는 너무 큽니다. 8MB 미만으로 올려 주세요.
  • 200not-allowed이 계정은 이미지 생성이 꺼져 있습니다. 지원팀에 문의해 주세요.
  • 200storage-failed이미지는 만들어졌지만 저장하지 못했습니다. 저희 잘못입니다 — 지원팀에 알려 주세요.
  • 200no-source-image먼저 편집할 이미지를 골라 주세요.
  • 200busy한꺼번에 요청이 너무 많습니다. 크레딧은 안전합니다 — 잠시 뒤 다시 시도해 주세요.
  • 200blocked이 프롬프트는 이용 규정을 어겨 전송되지 않았습니다. 크레딧은 쓰이지 않았습니다.
  • 200email-unverified이미지를 만들기 전에 이메일 주소를 확인해 주세요. 계정 페이지에서 새 링크를 받을 수 있습니다.