문제 생성기 API

문제 생성기 API를 애플리케이션에 통합하세요. 성공적인 생성만이 카운트됩니다. 계정을 만들고 지금 시작하세요.

문서

크레딧

$5

대략 100개의 API 요청.

각 API 요청은 5-10개의 문제를 생성합니다. 성공적인 생성만이 카운트됩니다.

생성된 문제 수


1,000


문서

문제 생성기 API를 애플리케이션에 통합하세요. 각 API 요청은 5-10개의 문제를 생성합니다. 성공적인 생성만이 카운트됩니다.

API 키 받기

문제 생성기 API를 구독하면 이 페이지에서 API 키를 확인할 수 있습니다.

API 엔드포인트

https://api.opexams.com

인증

문제 생성기 API를 사용하려면 요청을 인증해야 합니다. API 키를 api-key 헤더에 보내면 인증할 수 있습니다.

"api-key": "YOUR-API-KEY"

POST /questions-generator

JSON 형식의 본문을 제공하여 다음 매개변수를 사용하여 문제를 생성하세요:

이름

유형

필수

설명

type

string

true

생성할 문제의 유형입니다. `contextBased` 또는 `topicBased`일 수 있습니다.

context

string

if type is `contextBased`

문제를 생성할 텍스트

topic

string

if type is `topicBased`

생성할 문제의 주제입니다.

questionType

string

true

생성할 문제의 유형입니다. `객관식`, `참/거짓`, 또는 `주관식`일 수 있습니다.

language

string

false

생성된 문제의 언어입니다. 지원되는 모든 언어 목록은 여기에서 확인할 수 있습니다. 기본값은 `Auto`입니다.

difficulty

string

false

생성할 문제의 난이도입니다. `쉬움`, `보통`, 또는 `어려움`일 수 있습니다.

requestId

string

false

요청의 ID입니다. 요청을 추적하는 데 사용할 수 있습니다.

테스트 요청

`request-type` 헤더를 `test`로 설정하여 API를 테스트할 수 있습니다. 이 경우 요청은 사용량에 포함되지 않습니다.

응답

성공적인 요청에 대한 응답 예시:

{ "data": [ { "id": "pDgnjdMzOt9", "question": "Who founded University College London?", "answer": "Jeremy Bentham", "options": ["Charles Darwin", "Jeremy Bentham", "Isaac Newton", "William Shakespeare", "Albert Einstein"] }, { "id": "GZG49mXC3Jy", "question": "In what year was UCL established?", "answer": "1826", "options": ["1826", "1939", "1865", "1790", "1901"] }, { "id": "r0SclR9bOYf", "question": "What is the motto of UCL?", "answer": "Scientia et Labore", "options": ["Lux et Veritas", "In Hoc Signo Vinces", "Sapere Aude", "Scientia et Labore", "Deo Juvante"] }, { "id": "Tjadx7EYWKL", "question": "Which famous philosopher taught at UCL?", "answer": "Karl Marx", "options": ["Socrates", "Aristotle", "Plato", "Friedrich Nietzsche", "Karl Marx"] }, { "id": "Z9TxfwpFzvN", "question": "Who is the current Provost of UCL?", "answer": "David Price", "options": ["Richard Horton", "David Price", "Jeremy Farrar", "Patrick Vallance", "Mark Walport"] }, { "id": "q-DdK8od76m", "question": "Which UCL constituent college specializes in medical sciences?", "answer": "UCL Faculty of Medical Sciences", "options": ["UCL School of Slavonic and East European Studies", "UCL Institute of Education", "UCL Faculty of Laws", "UCL Faculty of Engineering Science", "UCL Faculty of Medical Sciences"] }, { "id": "0eUI1bSZpaE", "question": "What is the name of UCL's student union?", "answer": "UCLSU", "options": ["UCL Union", "UCLU", "UCLSU", "UCL Student Life", "UCL Campus Life"] }, { "id": "IXZvKXJMZoW", "question": "What is the name of UCL's main library?", "answer": "The UCL Main Library", "options": ["Senate House Library", "British Library", "UCL Library Services", "The Maughan Library", "The UCL Main Library"] }, { "id": "5qLp-pHWWnn", "question": "Which famous writer studied at UCL?", "answer": "Virginia Woolf", "options": ["Virginia Woolf", "Charles Dickens", "William Shakespeare", "Jane Austen", "Oscar Wilde"] }, { "id": "Hj2nDaEw2rW", "question": "Which famous museum is located on UCL's campus?", "answer": "The Petrie Museum of Egyptian Archaeology", "options": ["British Museum", "Science Museum", "Natural History Museum", "Victoria and Albert Museum", "The Petrie Museum of Egyptian Archaeology"] } ] }

GET /questions-generator/usage

이 엔드포인트로 GET 요청을 보내면 사용량을 확인할 수 있습니다.

응답

성공적인 요청에 대한 응답 예시:

{ "usedCredits": 150, "totalCredits": 1000, "creditsLeft": 850 }

오류 코드

문제 생성기 API는 다음 오류 코드를 사용합니다:

Code

Description

400

Bad Request — Your request is invalid.

401

Unauthorized — Your API key is invalid.

지원되는 언어

문제 생성기 API에서 지원하는 모든 언어 목록입니다. 언어는 제목과 동일하게 제공해야 합니다. 기본값은 `Auto`이며, 자동으로 감지됩니다.

제목

언어

English

English

Arabic

العربية

Afrikaans

Afrikaans

Albanian

Shqip

Armenian

Հայերեն

Assamese

অসমীয়া

Azerbaijani

Azərbaycanca

Bashkir

Башҡорт

Basque

Euskara

Belarusian

Беларуская

Bengali

বাংলা

Bhojpuri

भोजपुरी

Bosnian

Bosanski

Brazilian Portuguese

Português do Brasil

Bulgarian

Български

Cantonese (Yue)

粵語

Catalan

Català

Chinese

中文

Croatian

Hrvatski

Czech

Čeština

Danish

Dansk

Dutch

Nederlands

Estonian

Eesti

Faroese

Føroyskt

Filipino

Filipino

Finnish

Suomi

French

Français

Galician

Galego

Georgian

ქართული

German

Deutsch

Greek

Ελληνικά

Gujarati

ગુજરાતી

Haitian Creole

Kreyòl Ayisyen

Hausa

Hausa

Hebrew

עברית

Hindi

हिन्दी

Hmong

Hmoob

Hungarian

Magyar

Icelandic

Íslenska

Igbo

Igbo

Indonesian

Bahasa Indonesia

Irish

Gaeilge

Italian

Italiano

Japanese

日本語

Kannada

ಕನ್ನಡ

Kazakh

Қазақ

Khmer

ភាសាខ្មែរ

Korean

한국어

Kurdish

Kurdî

Lao

ລາວ

Latvian

Latviešu

Lithuanian

Lietuvių

Malay

Bahasa Melayu

Maltese

Malti

Marathi

मराठी

Mongolian

Монгол

Nepali

नेपाली

Norwegian

Norsk

Pashto

پښتو

Persian

فارسی

Polish

Polski

Portuguese

Português

Romanian

Română

Russian

Русский

Serbian

Српски

Sinhala

සිංහල

Slovak

Slovenčina

Slovenian

Slovenščina

Spanish

Español

Swahili

Kiswahili

Swedish

Svenska

Tamil

தமிழ்

Telugu

తెలుగు

Thai

ไทย

Turkish

Türkçe

Ukrainian

Українська

Urdu

اردو

Vietnamese

Tiếng Việt