LogoLogo
  • Welcome
  • Imagine API Studio
  • Get Your API Key
  • Imagine API Reference
  • Getting Started
    • How the API Works
    • API Key Management
    • Selecting the Right API Plan
    • Get Free API Calls
    • Your First API Call
    • Available AI Features in the API
    • Integrating the API into Your Project
    • API Call Billing and Token Usage
  • Troubleshooting
    • Request and Response Formats
    • Error Documentation
    • Troubleshooting Tips
    • Getting Support
  • Core Concepts
    • API Prototyping
    • Creating an Effective Prompt
    • Selecting the Right Style
    • Randomization Control (Seed)
  • Image Generation APIs
    • Introduction
    • Text to Image API
    • Text to PNG API
  • Image Editing APIs
    • Introduction
    • Background Remover API
    • Image Upscale API
    • Generative Fill API
    • AI Resize API
    • Retouch API
  • E-Commerce APIs
    • AI Backgrounds API
  • Video Generation API's
    • Introduction
    • Text to Video API
    • Image to Video API
    • Status API
    • Delete API
Powered by GitBook
On this page
  • Request Format
  • Response Status Codes
  1. Troubleshooting

Request and Response Formats

PreviousTroubleshootingNextError Documentation

Last updated 5 months ago

Imagine API primarily uses JSON for data interchange to maximize compatibility with various programming languages. This guide focuses on the Generations service, which generates images from text prompts, and these principles apply to other API services as well.

Request Format

Our API requests use method with multipart/form-data content to accommodate image file uploads and additional data.

curl --location --request POST 'https://api.vyro.ai/v2/image/generations' \
--header 'Authorization: Bearer vk-ad08a8e86d1a84404e5837be47d39ab44474f982671c0a' \
--form 'prompt="A futuristic cityscape at night with neon lights"' \
--form 'style="realistic"' \
--form 'aspect_ratio="1:1"'

Response Status Codes

When a request is successful, you will receive an image as output. Below are the status codes that you might encounter:

Status Code
Type
Description

200

Success

The request completed successfully, and the image was generated as expected.

400

Bad Request

The request is malformed or incomplete.

401

Unauthorized

Authentication is required or failed.

429

Too Many Requests

Too many requests have been sent within a given timeframe.

500

Internal Server Error

An unexpected issue occurred.

For comprehensive API reference details, please visit our .

POST
API References