Powerful API Integration

Integrate Vibecode Studio into your applications with our comprehensive API. Generate code, create images, and convert text to speech programmatically.

API Endpoints

Explore our available API endpoints and their capabilities

Chat Completion

POST

Generate conversational AI responses with streaming support

/openai/v1/chat/completions

Image Generation

GET

Create stunning images from text prompts

/p/{prompt}

Text to Speech

GET

Convert text to natural sounding speech

/{prompt}

JavaScript SDK

Our JavaScript SDK makes it easy to integrate Vibecode Studio into your web applications. With built-in support for streaming responses, image generation, and text-to-speech.

  • Streaming chat completions
  • Image generation with text prompts
  • Text-to-speech conversion
  • Promise-based async/await support
JavaScript Example
import { PollinationClient } from '@vibecode/sdk';

                            
const client = new PollinationClient({
  apiKey: 'your-api-key'
});

                            
const response = await client.chatCompletion({
  messages: [{
    role: 'user',
    content: 'Create a responsive navbar with Tailwind'
  }],
  model: 'gpt-4o'
});

                            
console.log(response.choices[0].message.content);

API Examples

See how easy it is to integrate Vibecode Studio into your applications

Chat Completion

const response = await fetch('https://text.pollinations.ai/openai/v1/chat/completions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    messages: [{
      role: 'user',
      content: 'Explain quantum computing in simple terms'
    }]
  })
});

Generate conversational AI responses with our chat completion endpoint.

Image Generation

const imageUrl = 'https://pollinations.ai/p/A beautiful sunset?model=flux&width=1024&height=1024';

                        
const response = await fetch(imageUrl);
const imageBlob = await response.blob();

                        
const imageUrl = URL.createObjectURL(imageBlob);
document.getElementById('image').src = imageUrl;

Create stunning images from text prompts with our image generation API.

Start Building with Vibecode API

Get your API key and start integrating powerful AI capabilities into your applications today.