LogoLogo
HomeExploreDocsAPIBlogContact
  • 🗃️Gooey.AI Docs
  • Changelog
  • 📖Guides
    • 🤖How to build an AI Copilot?
      • AI Prompting: Best practices
      • Curate your Knowledge Base Documents
      • Advanced Settings
      • Prepare Synthetic Data
      • Conversation Analysis
        • Glossary
      • Building a Multi-Modal Copilot
      • Frequently Asked Questions about AI Copilot
      • How to Automate Data Export?
    • 🚀How to deploy an AI Copilot?
      • Deploy to Web
      • Deploy to WhatsApp
      • Deploy to Slack
      • Deploy to Facebook
      • Broadcast Messages (via web or API)
      • Add buttons to your Copilot
    • ⚖️Understanding Bulk Runner and Evaluation
      • 💪How to set up Bulk Runner?
      • 🕵️‍♀️How to set up Evaluations?
      • How to use Bulk Run via API
    • 👄How to use AI Lip Sync Generator?
      • Lip Sync Animation Generator (WITH AUDIO FILES)
      • LipSync videos with Custom Voices
      • Set up your API for Lipsync with Local Folders
      • Tips to create great HD lipsync output
      • Frequently Asked Questions about Lipsync
    • 🗣️How to use ASR?
      • 📊How to create language evaluation for ASR?
    • How to use Compare AI Translations?
      • Google Translate Glossary
    • How does RAG-based document search work?
    • 🧩How to use Gooey Functions?
      • ✨LLM-enabled Functions
      • How to use SECRETS in Functions?
      • 🔥How to connect FirebaseDB to Copilot
    • 🎞️How to create AI Animations?
    • 🤳How to make amazing AI Art QR Codes?
      • API tips on AI Art QR Codes
    • 🖼️Create an AI Image with text
      • AI Image Prompting
      • API Tips for AI Image Generator
    • 📸AI Photo Editor
      • Build your avatar with AI
    • 🧑‍🏫How to use Gooey.AI’s Image Model Trainer?
    • 🔍Generate “People Also Ask” SEO Content
    • 🌐How to create SEO-Optimized content with AI?
    • How to use Workspaces?
      • How to use Version History?
      • How to add SECRETS in your Workspace?
    • 🍟How can I get free credits?
  • 😇CONTRIBUTING
    • Contributing
    • Documentation Style Guide
  • 🤓API REFERENCE
    • Getting started
    • API Generator
    • Rate Limits
    • Error Codes
  • 🍭ENDPOINTS
    • Copilot
    • Lipsync
    • Lipsync TTS
    • AI Art QR Generator
    • AI Animation Generator
    • Compare AI Image Generator
    • Gooey.AI on GitHub
Powered by GitBook
LogoLogo

Home

  • Gooey.AI
  • Explore Workflows
  • Sign In
  • Pricing

Learn

  • Docs
  • Blog
  • FAQs
  • Videos

Developers

  • How-to Guides
  • Get your Gooey.AI Key
  • Github
  • API Endpoints

Connect

  • Book a Demo
  • Discord
  • Team
  • Jobs

@Dara.network / Gooey.AI / support@gooey.ai

On this page
  • API Errors
  • Handling Errors

Was this helpful?

Edit on GitHub
  1. API REFERENCE

Error Codes

Last updated 8 months ago

Was this helpful?

If you encountered some error in your API and SDK calls, chances are there is an "error code" in the response message. Have a look at the error codes to know more and head to the bottom of the page to :

API Errors

Error Code
Overview

401 API key not provided / banned

Cause: Invalid Authentication

Cause: You are banned from using Gooey.AI’s API

402 Payment Required

Cause: Insufficient credits

403 Invalid API Key

Cause: The requesting API key is not correct.

422 Validation Error

Cause: Your request was malformed or missing some required parameters, such as a token or an input.

429 Too Many Requests

500 Internal Server Error

Cause: Issue on our servers.

Handling Errors

We recommend that you programmatically handle errors. Here is an example to ensure that you can get the error codes in your console/environment

In the code snippet below the line if (!response.ok) { throw new Error(response.status); } provides the error codes in your console/environment.

import fetch from 'node-fetch';

const payload = {
  "search_query": "what are f-strings?",
  "documents": [
    "https://static.realpython.com/python-basics-sample-chapters.pdf",
    "https://edu.anarcho-copy.org/Programming%20Languages/Python/Automate%20the%20Boring%20Stuff%20with%20Python.pdf"
  ]
};

async function gooeyAPI() {
  const response = await fetch("https://api.gooey.ai/v2/doc-search", {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + process.env["GOOEY_API_KEY"],
      "Content-Type": "application/json",
    },
    body: JSON.stringify(payload),
  });

  if (!response.ok) {
    throw new Error(response.status);
  }

  const result = await response.json();
  console.log(response.status, result);
}

gooeyAPI();

Solution: Ensure the and requesting organization is being used. Or

Solution: Ensure you have sufficient credits to run the API call. You can add .

Solution: Ensure the API key used is correct, clear your browser cache, or .

Solution: The error message should advise you on the specific error made. Check the for the specific API method you are calling and make sure you are sending valid and complete parameters. You may also need to check the encoding, format, or size of your request data.

Cause: You have exceeded your rate limits Solution: Pace your requests. Read the .

Solution: Retry your request after a brief wait and contact us if the issue persists. Check the .

🤓
handle errors programmatically
correct API key
more credits to your account
generate a new one
API documentation
Rate limit guide
status page