> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# استخدام Go SDK

> أساليب wrapper المدعومة حاليًا في Go SDK.

## الإعداد

```go theme={null}
import (
  "context"
  phaseo "github.com/phaseoteam/Phaseo/packages/sdk/sdk-go/v3"
)

client := phaseo.New("<API_KEY>", "https://api.phaseo.app/v1")
ctx := context.Background()
```

## إكمالات المحادثة

```go theme={null}
chatReq := phaseo.ChatCompletionsRequest{
  Model: "openai/gpt-5-nano",
  Messages: []map[string]interface{}{
    {"role": "user", "content": "Hello"},
  },
}
chatResp, err := client.GenerateText(ctx, chatReq)
```

## Responses

```go theme={null}
input := map[string]interface{}{
  "role": "user",
  "content": []map[string]interface{}{
    {"type": "input_text", "text": "Reply with: go sdk works"},
  },
}
resp, err := client.GenerateResponse(ctx, phaseo.ResponsesRequest{
  Model: "openai/gpt-5-nano",
  Input: &input,
})
```

## التضمينات

```go theme={null}
embedding, err := client.GenerateEmbedding(ctx, map[string]interface{}{
  "model": "openai/text-embedding-3-large",
  "input": "Sample text",
})
```

## الإشراف

```go theme={null}
moderation, err := client.GenerateModeration(ctx, map[string]interface{}{
  "model": "openai/omni-moderation-latest",
  "input": "Some text to check",
})
```

## الصور والصوت

```go theme={null}
image, err := client.CreateImage(ctx, map[string]interface{}{
  "model": "openai/gpt-image-1",
  "prompt": "A lighthouse at golden hour",
})

speech, err := client.CreateSpeech(ctx, map[string]interface{}{
  "model": "openai/gpt-4o-mini-tts",
  "input": "Hello from Go",
})
```

## النماذج

```go theme={null}
models, err := client.GetModels(ctx, map[string]string{"limit": "10"})
```

## القيود الحالية

يغطي Go wrapper الآن المحادثات وResponses والصور والصوت والتضمينات والإشراف والنماذج والمزوّدين والدفعات والملفات واسترجاع عمليات التوليد والحالة وأدوات الفيديو. تظل العمليات المولّدة منخفضة المستوى متاحة لنقاط النهاية التي لم تُضف بعد إلى wrapper المكتوب يدويًا، كما يعاد تصدير أنواع الطلبات الشائعة من حزمة wrapper.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.