magic loops
GPT API Loop
API Call 🚇
Trigger the loop when a POST request is made to the API endpoint with a JSON body containing a 'prompt' and optional 'parameters'.
Loading...
API Response 🚇
Return the JSON object from CODE_BLOCK_OUTPUT as the response to the original API request.
Description
API to generate GPT text
openapi: 3.0.0
info:
title: Story Generator Loop API
version: 1.0.0
description: This API generates a story based on a given prompt about a space adventure.
servers:
- url: https://magicloops.dev/api/loop
description: Main production server
paths:
/run/9acbbf69-7f25-405c-8989-fda23411207a:
post:
summary: Generate Space Adventure Story
operationId: generateStory
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
prompt:
type: string
example: Tell me a story about a space adventure.
responses:
"200":
description: A successful response with the generated story
content:
application/json:
schema:
type: object
properties:
generated_text:
type: string
example: Once upon a time in the vastness of space, a crew of astronauts embarked on an epic journey to explore
uncharted galaxies. Their ship, the Odyssey Nebula, was a marvel of engineering, equipped with an
artificial intelligence named ARIA that could navigate through cosmic storms and asteroid belts
with ease. Captain Elara, a visionary explorer, and her diverse team were motivated by a desire to
discover new worlds, potential homes for humanity's expanding population. As they cruised beyond
the Milky Way, the gravity sensors blinked urgently; they had stumbled upon a mysterious wormhole
shimmering with a kaleidoscope of colors. Driven by curiosity and a dash of recklessness, Captain
Elara decided to take the plunge. The Odyssey Nebula dove into the wormhole, and time bent around
them. It was a roller coaster through the fabric of reality itself. When they emerged on the other
side, they found themselves in a galaxy with two suns and planets that defied imagination. There
were worlds with oceans of liquid crystals, others with floating continents. It was an untouched
paradise. But as they prepared to explore, they realized they were not alone. Beneath the surface
of these strange planets, signs of an ancient civilization awaited, beckoning the brave astronauts
to uncover secrets millennia old.
5.0 (1 rating)
2 runs