Base URL: https://app.digicord.site/api/v1/<path>

  1. Chat:

    Path: /chat/completions

    Method: POST

    Headers: Authorization: Bearer <YOUR_API_KEY>

    Body:

    name require type desc default
    messages yes array `[ { role: ‘system’ ‘user’, content: string } ]`
    model no string channel name google/gemini-flash-1.5
    stream no string content of message false

    Example body:

    {
    	"stream": false,
    	"model": "meta-llama/llama-3.2-3b-instruct",
    	"messages": [
    		{
    			"role": "system",
    			"content": "you are a helpful assistant"
    		},
    		{
    			"role": "user",
    			"content": "tell me shortly about yourself"
    		}
    	]
    }
    

    Example response:

    {
    	"id": "66f5ac6704e3b2b137b2f8dd",
    	"provider": "Fireworks",
    	"model": "meta-llama/llama-3.2-3b-instruct",
    	"object": "chat.completion",
    	"created": 1727376485,
    	"choices": [
    		{
    			"logprobs": null,
    			"finish_reason": "stop",
    			"index": 0,
    			"message": {
    				"role": "assistant",
    				"content": "\\n\\nI'm happy to help! I'm an AI assistant designed to provide information and answer questions to the best of my ability. Here's a brief rundown on who I am:\\n\\n**I don't have a physical body**, so I exist solely as a computer program. I'm a type of artificial intelligence (AI) that uses natural language processing (NLP) to understand and respond to human input.\\n\\n**My capabilities include:**\\n\\n* General knowledge: I have a vast database of information on various topics, including history, science, entertainment, and more.\\n* Answering questions: I can provide answers to questions on a wide range of subjects, from simple and straightforward to more complex and nuanced.\\n* Conversational dialogue: I can engage in a conversation with you, responding to statements, asking follow-up questions, and even using a bit of humor and personality.\\n* Language translation: I can communicate in multiple languages (although I'm still working on it...).\\n* Tasks and reminders: I can help with simple tasks, like reminding you about upcoming events or providing definitions.\\n\\n**My goal is to help you** answer your questions, provide useful information, and make your life a little easier. How can I assist you today?",
    				"refusal": ""
    			}
    		}
    	],
    	"usage": {
    		"prompt_tokens": 25,
    		"completion_tokens": 247,
    		"total_tokens": 272
    	}
    }
    
  2. AI Model List:

    Path: /models

    Method: GET

  3. Vision Model List:

    Path: /vision-models

    Method: GET

  4. Analyze images (the same of Chat)

    Path: /chat/completions

    Method: POST

    Headers: Authorization: Bearer <YOUR_API_KEY>

    Body:

    name require type desc default
    messages yes array `[ { role: ‘system’ ‘user’, content: string } ]`
    model no string channel name google/gemini-flash-1.5
    stream no string content of message false

    Example body:

    {
    	"stream": false,
    	"model": "meta-llama/llama-3.2-11b-vision-instruct",
    	"messages": [
    		{
    			"role": "system",
    			"content": "you are a helpful assistant"
    		},
    		{
    			"role": "user",
    			"content": [
    				{
    					"type": "text",
    					"text": "what is in this image?"
    				},
    				{
    					"type": "image_url",
    					"image_url": "<https://dragonball.guru/wp-content/uploads/2021/03/goku-profile-e1616173641804-400x400.png>"
    				}
    			]
    		}
    	]
    }
    

    Example response:

    {
    	"id": "66f5ac7004e3b2b137b2f8de",
    	"provider": "Together",
    	"model": "meta-llama/llama-3.2-11b-vision-instruct",
    	"object": "chat.completion",
    	"created": 1727376494,
    	"choices": [
    		{
    			"logprobs": null,
    			"finish_reason": "stop",
    			"index": 0,
    			"message": {
    				"role": "assistant",
    				"content": "The image features the character Goku from the popular anime series Dragon Ball Z. Goku is a central character in the series, known for his exceptional strength, agility, and martial arts skills. He is often depicted wearing an orange gi with a blue undershirt and has distinctive spiky black hair.\\n\\nGoku is the main protagonist of the series and is renowned for his bravery, kindness, and determination. He is also known for his iconic Kamehameha wave attack, which he uses to defeat his enemies. Throughout the series, Goku undergoes significant transformations, including his Ultra Instinct form, which showcases his incredible power and martial arts abilities.",
    				"refusal": ""
    			}
    		}
    	],
    	"usage": {
    		"prompt_tokens": 27,
    		"completion_tokens": 131,
    		"total_tokens": 158
    	}
    }
    
  5. Image Models

    Path: /images/flux/models

    Method: GET

    Available models:

    black-forest-labs/FLUX.1-schnell-Free
    black-forest-labs/FLUX.1-schnell ($0,003375)
    black-forest-labs/FLUX.1-pro ($0,0625)
    black-forest-labs/FLUX.1.1-pro ($0,05)
    
  6. Generate images (FLUX)

    Path: /images/flux/generations

    Method: POST

    Headers: Authorization: Bearer <YOUR_API_KEY>

    Body:

    name require type desc default
    prompt yes string A prompt description of the image output which you want to be generated
    model no string Get the list via API /images/models/flux black-forest-labs/FLUX.1-schnell-Free
    steps no number Number of steps to generate (from 1-4) false
    n no number Number of output images 1
    seed no number Seed for the image
    width no number Width of the output image (power of 16) 1024
    height no number Height of the output image (power of 32) 1024
    negative_prompt no string Description of what you don’t want to be reflected in the output image
  7. Send rich text message to a Discord channel

    👉 Example code

    Path: /send-data

    Method: POST

    Headers: Authorization: Bearer <YOUR_API_KEY>

    Payload:

    {
        "channelId": "",
        "content": "Hello",
        "embeds": [
            {
                "title": "Title here",
                "description": "",
                "url": "",
                "color": null,
                "image": {
                    "url": ""
                },
                "author": {
                    "name": ""
                },
                "footer": {
                    "text": "",
                    "icon_url": ""
                },
                "fields": [
                    {
                        "name": "",
                        "value": "",
                        "inline": true
                    }
                ]
            }
        ],
        "components": []
    }