MoleAPIMoleAPI
문서API 참조AI 모델 API 엔드포인트완성(Completions)

네이티브 OpenAI 형식

지정된 프롬프트를 기반으로 텍스트 완성을 생성합니다

POST
/v1/completions

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Request Body

application/json

model*string
prompt*string|
max_tokens?integer
temperature?number
top_p?number
n?integer
stream?boolean
stop?string|
suffix?string
echo?boolean

Response Body

application/json

curl -X POST "https://api.moleapi.com/v1/completions" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "prompt": "string"  }'
{
  "id": "string",
  "object": "text_completion",
  "created": 0,
  "model": "string",
  "choices": [
    {
      "text": "string",
      "index": 0,
      "finish_reason": "string"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "text_tokens": 0,
      "audio_tokens": 0,
      "image_tokens": 0
    },
    "completion_tokens_details": {
      "text_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 0
    }
  }
}

이 문서가 도움이 되었나요?

마지막 업데이트

홈으로 돌아가기게이트웨이